Skip to content

Commit 6d4e37c

Browse files
committed
feat: add spanish translations and optional logo param config
1 parent 4066b13 commit 6d4e37c

20 files changed

Lines changed: 2363 additions & 201 deletions

File tree

FirebaseSwiftUI/FirebaseAppleSwiftUI/Sources/Views/SignInWithAppleButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public struct SignInWithAppleButton {
2929
extension SignInWithAppleButton: View {
3030
public var body: some View {
3131
AuthProviderButton(
32-
label: "Sign in with Apple",
32+
label: authService.string.appleLoginButtonLabel,
3333
style: .apple,
3434
accessibilityId: "sign-in-with-apple-button"
3535
) {

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Services/AuthConfiguration.swift

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414

1515
import FirebaseAuth
1616
import Foundation
17+
import SwiftUI
1718

1819
public struct AuthConfiguration {
20+
public let logo: ImageResource?
1921
public let shouldHideCancelButton: Bool
2022
public let interactiveDismissEnabled: Bool
2123
public let shouldAutoUpgradeAnonymousUsers: Bool
@@ -31,17 +33,21 @@ public struct AuthConfiguration {
3133
public let allowedSecondFactors: Set<SecondFactorType>
3234
public let mfaIssuer: String
3335

34-
public init(shouldHideCancelButton: Bool = false,
35-
interactiveDismissEnabled: Bool = true,
36-
shouldAutoUpgradeAnonymousUsers: Bool = false,
37-
customStringsBundle: Bundle? = nil,
38-
tosUrl: URL? = nil,
39-
privacyPolicyUrl: URL? = nil,
40-
emailLinkSignInActionCodeSettings: ActionCodeSettings? = nil,
41-
verifyEmailActionCodeSettings: ActionCodeSettings? = nil,
42-
mfaEnabled: Bool = false,
43-
allowedSecondFactors: Set<SecondFactorType> = [.sms, .totp],
44-
mfaIssuer: String = "Firebase Auth") {
36+
public init(
37+
logo: ImageResource? = nil,
38+
shouldHideCancelButton: Bool = false,
39+
interactiveDismissEnabled: Bool = true,
40+
shouldAutoUpgradeAnonymousUsers: Bool = false,
41+
customStringsBundle: Bundle? = nil,
42+
tosUrl: URL? = nil,
43+
privacyPolicyUrl: URL? = nil,
44+
emailLinkSignInActionCodeSettings: ActionCodeSettings? = nil,
45+
verifyEmailActionCodeSettings: ActionCodeSettings? = nil,
46+
mfaEnabled: Bool = false,
47+
allowedSecondFactors: Set<SecondFactorType> = [.sms, .totp],
48+
mfaIssuer: String = "Firebase Auth"
49+
) {
50+
self.logo = logo
4551
self.shouldHideCancelButton = shouldHideCancelButton
4652
self.interactiveDismissEnabled = interactiveDismissEnabled
4753
self.shouldAutoUpgradeAnonymousUsers = shouldAutoUpgradeAnonymousUsers

0 commit comments

Comments
 (0)