Replies: 3 comments
-
@urimext have you found any solution yet? |
Beta Was this translation helpful? Give feedback.
0 replies
-
While the Admin SDK does allow us to define MFA phone numbers, this method still requires a third-party OTP solution. The frontend SDKs (eg. Flutter) should allow for an OTP-powered MFA phone number update solution. |
Beta Was this translation helpful? Give feedback.
0 replies
-
To update the phone number that is used as second factor, proceed as follows:
More details on step 1) and 2) can be found at https://firebase.google.com/docs/auth/flutter/multi-factor |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to update phone number on user(that has MFA enrolled) through method:
FirebaseAuth.instance.currentUser?.updatePhoneNumber(credential)
but it fails with:Unhandled Exception: [firebase_auth/unsupported-first-factor] Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor. [ A phone number cannot be set as a first factor on an SMS based MFA user. ]
It works in case when updating phone number of user that doesn't have MFA enrolled.
So is this restricted from Firebase? Or is there any other way to have both MFA enrolled and user with filled field "phoneNumber"?
Note: Through Admin SDK and Firebase console I can have both MFA & phoneNumber field filled.
Beta Was this translation helpful? Give feedback.
All reactions