-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[auth-swift] Fix Component warning #12269
Conversation
Generated by 🚫 Danger |
adfad04
to
2dd98ae
Compare
2dd98ae
to
998853a
Compare
@@ -168,7 +168,7 @@ extension Auth: AuthInterop { | |||
@return The `Auth` instance associated with the given app. | |||
*/ | |||
@objc open class func auth(app: FirebaseApp) -> Auth { | |||
return ComponentType<AuthProvider>.instance(for: AuthProvider.self, in: app.container) as! Auth | |||
return ComponentType<AuthProvider>.instance(for: AuthProvider.self, in: app.container).auth() |
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.
Now the type can be right here, since we return an AuthComponent instead of an Auth below.
return Auth(app: app) | ||
let newComponent = AuthComponent(app: app) | ||
// Set up instances early enough so User on keychain will be decoded. | ||
newComponent.auth() |
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.
Without doing this priming, User will not be initialized from the keychain
Merging here. I'll address any comments in a subsequent PR |
This fixes the following console log warning:
10.20.0 - [FirebaseCore][I-COR000030] An instance conforming to FIRAuthProvider was requested, but the instance provided does not conform to the protocol