-
Notifications
You must be signed in to change notification settings - Fork 487
feat: Optional logo, languageCode params in AuthConfiguration, added language translations. #1293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
russellwheatley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good 👍 .
| // Present modally | ||
| topViewController.present(hostingController, animated: true) | ||
| } | ||
| fatalError("Not implemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a note to follow up with this after this PR is in so it's a separate issue. Ultimately, we should change from:
public protocol AuthProviderSwift {
@MainActor func createAuthCredential() async throws -> AuthCredential
}
to
public protocol AuthProviderSwift {}
Then we can have a generic protocol for google, twitter, apple, etc like this:
public protocol GenericAuthProviderSwift: AuthProviderSwift {
@MainActor func createAuthCredential() async throws -> AuthCredential
}
and phone can have:
public protocol GenericAuthProviderSwift: AuthProviderSwift {
@MainActor public func verifyPhoneNumber(phoneNumber: String) async throws -> VerificationID {
@MainActor func createAuthCredential(verificationId: String, verificationCode: String) async throws -> AuthCredential
}
Then we can handle each different provider appropriately and not have methods that throw errors. what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this works tbh so based on the provider we can have implementations for each.
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExample.xcodeproj/project.pbxproj
Outdated
Show resolved
Hide resolved
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExample/App/ContentView.swift
Outdated
Show resolved
Hide resolved
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExample/App/ContentView.swift
Outdated
Show resolved
Hide resolved
…xcodeproj/project.pbxproj Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
Added optional logo parameter to AuthConfiguration which overrides firebase auth logo in AuthPickerView.
Added languageCode parameter to AuthConfiguration which allows the developer force a locale (overrides device locale if set).
Added Spanish, German and French language translations.
Language translations