The account conflict error.Refer to firebase.auth.Auth.signInWithPopup for more information.

Common Error Codes

auth/account-exists-with-different-credential
Thrown if there already exists an account with the email addressasserted by the credential. Resolve this by callingfirebase.auth.Auth.fetchSignInMethodsForEmail with the error.emailand then asking the user to sign in using one of the returned providers.Once the user is signed in, the original credential retrieved from theerror.credential can be linked to the user withfirebase.User.linkWithCredential to prevent the user from signingin again to the original provider via popup or redirect. If you are usingredirects for sign in, save the credential in session storage and thenretrieve on redirect and repopulate the credential using for examplefirebase.auth.GoogleAuthProvider.credential depending on thecredential provider id and complete the link.
auth/credential-already-in-use
Thrown if the account corresponding to the credential already existsamong your users, or is already linked to a Firebase User.For example, this error could be thrown if you are upgrading an anonymoususer to a Google user by linking a Google credential to it and the Googlecredential used is already associated with an existing Firebase Googleuser.The fieldserror.email,error.phoneNumber, anderror.credential (firebase.auth.AuthCredential)may be provided, depending on the type of credential. You can recoverfrom this error by signing in witherror.credential directlyviafirebase.auth.Auth.signInWithCredential.
auth/email-already-in-use
Thrown if the email corresponding to the credential already existsamong your users. When thrown while linking a credential to an existinguser, anerror.email anderror.credential(firebase.auth.AuthCredential) fields are also provided.You have to link the credential to the existing user with that email ifyou wish to continue signing in with that credential. To do so, callfirebase.auth.Auth.fetchSignInMethodsForEmail, sign in toerror.email via one of the providers returned and thenfirebase.User.linkWithCredential the original credential to thatnewly signed in user.

Index

Properties

code

code:string

Inherited fromError.code

Unique error code.

Optional credential

credential:AuthCredential

Thefirebase.auth.AuthCredential that can be used to resolve theerror.

Optional email

email:string

The email of the user's account used for sign-in/linking.

message

message:string

Inherited fromError.message

Complete error message.

name

name:string

Inherited fromError.name

Optional phoneNumber

phoneNumber:string

The phone number of the user's account used for sign-in/linking.

Optional tenantId

tenantId:string

The tenant ID being used for sign-in/linking. If you usefirebase.auth.Auth.signInWithRedirect to sign in, you have toset the tenant ID on Auth instanace again as the tenant ID is notpersisted after redirection.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.