File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Sources/Swift/MultiFactor Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11# Unreleased
2+ - [ fixed] Fix Multi-factor session crash on second Firebase app. (#14238 )
23- [ fixed] Updated most decoders to be consistent with Firebase 10's behavior
34 for decoding ` nil ` values. (#14212 )
45
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import Foundation
3434 /// operation.
3535 @objc ( getSessionWithCompletion: )
3636 open func getSessionWithCompletion( _ completion: ( ( MultiFactorSession ? , Error ? ) -> Void ) ? ) {
37- let session = MultiFactorSession . sessionForCurrentUser
37+ let session = MultiFactorSession . session ( for : user )
3838 if let completion {
3939 completion ( session, nil )
4040 }
Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ import Foundation
3939 /// Current user object.
4040 var currentUser : User ?
4141
42- class var sessionForCurrentUser : MultiFactorSession {
43- guard let currentUser = Auth . auth ( ) . currentUser else {
42+ class func session( for user: User ? ) -> MultiFactorSession {
43+ let currentUser = user ?? Auth . auth ( ) . currentUser
44+ guard let currentUser else {
4445 fatalError ( " Internal Auth Error: missing user for multifactor auth " )
4546 }
4647 return . init( idToken: currentUser. tokenService. accessToken, currentUser: currentUser)
You can’t perform that action at this time.
0 commit comments