You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Firebase, when a user has opted in for TOTP, on signIn, a FirebaseAuthMultiFactorException error is thrown in android and iOS which we expect.
To continue logging in, we need the MultiFactorResolver to resolveSignIn. I see there is the MultiFactor classes defined in this library, but can't fetch the resolver out of the exception in iOS.
In android, as the FirebaseAuthMultiFactorException is just a typealias of the google FirebaseAuthMultiFactorException, in the androidMain I can access it like so.
actual fun extractMultiFactorResolver(e: Throwable): MultiFactorResolver? {
val authException = e as? FirebaseAuthMultiFactorException ?: return null
return MultiFactorResolver(authException.resolver)
}
However, in iOS, as a whole new error is thrown when this scenario happens (FirebaseAuthMultiFactorException(toString()) with just a toString() of the original error as the message in the new error, how can I acquire the resolver to continue?
The text was updated successfully, but these errors were encountered:
In Firebase, when a user has opted in for TOTP, on signIn, a
FirebaseAuthMultiFactorException
error is thrown in android and iOS which we expect.To continue logging in, we need the
MultiFactorResolver
to resolveSignIn. I see there is the MultiFactor classes defined in this library, but can't fetch the resolver out of the exception in iOS.https://firebase.google.com/docs/auth/android/totp-mfa#sign_in_users_with_a_second_factor
https://firebase.google.com/docs/auth/ios/totp-mfa#sign_in_users_with_a_second_factor
In android, as the FirebaseAuthMultiFactorException is just a typealias of the google FirebaseAuthMultiFactorException, in the
androidMain
I can access it like so.However, in iOS, as a whole new error is thrown when this scenario happens (
FirebaseAuthMultiFactorException(toString())
with just atoString()
of the original error as themessage
in the new error, how can I acquire the resolver to continue?The text was updated successfully, but these errors were encountered: