File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Services Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -824,6 +824,11 @@ public extension AuthService {
824824 let password = try await passwordPrompt. confirmPassword ( )
825825 let credential = EmailAuthProvider . credential ( withEmail: email, password: password)
826826 _ = try await user. reauthenticate ( with: credential)
827+ } else if providerId == PhoneAuthProviderID {
828+ // Phone auth requires manual reauthentication via sign out and sign in otherwise it will take the user out of the existing flow
829+ throw AuthServiceError . reauthenticationRequired (
830+ " Phone authentication requires you to sign out and sign in again to continue "
831+ )
827832 } else if let matchingProvider = providers. first ( where: { $0. id == providerId } ) ,
828833 let credentialProvider = matchingProvider. provider as? CredentialAuthProviderSwift {
829834 let credential = try await credentialProvider. createAuthCredential ( )
You can’t perform that action at this time.
0 commit comments