Manage an 'account-exists-with-different-credential' AuthFailed exception? #79
-
|
I want to manage an 'account-exists-with-different-credential' error during sign-in. To produce this error (on Android):
The callback The fields I don't know if it's a Firebase bug or a FirebaseUi issue. I'm using the latest package versions:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can handle this using AuthStateChangeAction<DifferentSignInMethodsFound>((context, state) {
final methods = state.methods; // an array of all provider id's associated with the email
// your custom logic here
});If you're using If you're building more customized UI – wrap your widget tree with FirebaseUIActions(
actions: [
AuthStateChangeAction<DifferentSignInMethodsFound>(handler),
],
child: yourWidget,
);There's also |
Beta Was this translation helpful? Give feedback.

You can handle this using
AuthStateChangeAction<DifferentSignInMethodsFound>.If you're using
SignInScreen, you can pass this actions toactionslist.If you're building more customized UI – wrap your widget tree with
FirebaseUIAction:There's also
showDifferentMethodSignInDialogthat will show relevant UI for given providers, so it could be used to handle this scenario.