bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
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 address
asserted by the credential. Resolve this by calling
firebase.auth.Auth.fetchSignInMethodsForEmail with the error.email
and then asking the user to sign in using one of the returned providers.
Once the user is signed in, the original credential retrieved from the
error.credential can be linked to the user with
firebase.User.linkWithCredential to prevent the user from signing
in again to the original provider via popup or redirect. If you are using
redirects for sign in, save the credential in session storage and then
retrieve on redirect and repopulate the credential using for example
firebase.auth.GoogleAuthProvider.credential depending on the
credential provider id and complete the link.
auth/credential-already-in-use
Thrown if the account corresponding to the credential already exists
among your users, or is already linked to a Firebase User.
For example, this error could be thrown if you are upgrading an anonymous
user to a Google user by linking a Google credential to it and the Google
credential used is already associated with an existing Firebase Google
user.
The fields error.email, error.phoneNumber, and
error.credential (firebase.auth.AuthCredential)
may be provided, depending on the type of credential. You can recover
from this error by signing in with error.credential directly
via firebase.auth.Auth.signInWithCredential.
auth/email-already-in-use
Thrown if the email corresponding to the credential already exists
among your users. When thrown while linking a credential to an existing
user, an error.email and error.credential
(firebase.auth.AuthCredential) fields are also provided.
You have to link the credential to the existing user with that email if
you wish to continue signing in with that credential. To do so, call
firebase.auth.Auth.fetchSignInMethodsForEmail, sign in to
error.email via one of the providers returned and then
firebase.User.linkWithCredential the original credential to that
newly signed in user.
The email of the user's account used for sign-in/linking.
message
message:string
Complete error message.
name
name:string
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 use
firebase.auth.Auth.signInWithRedirect to sign in, you have to
set the tenant ID on Auth instanace again as the tenant ID is not
persisted after redirection.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["# AuthError | JavaScript SDK\n\n- [firebase](/docs/reference/node/firebase).\n- [auth](/docs/reference/node/firebase.auth).\n- AuthError\n======================================================================================================\n\nThe account conflict error.\nRefer to firebase.auth.Auth.signInWithPopup for more information.\n\n#### Common Error Codes\n\nauth/account-exists-with-different-credential\n: Thrown if there already exists an account with the email address\n asserted by the credential. Resolve this by calling\n [firebase.auth.Auth.fetchSignInMethodsForEmail](/docs/reference/node/firebase.auth.Auth#fetchsigninmethodsforemail) with the error.email\n and then asking the user to sign in using one of the returned providers.\n Once the user is signed in, the original credential retrieved from the\n error.credential can be linked to the user with\n [firebase.User.linkWithCredential](/docs/reference/node/firebase.User#linkwithcredential) to prevent the user from signing\n in again to the original provider via popup or redirect. If you are using\n redirects for sign in, save the credential in session storage and then\n retrieve on redirect and repopulate the credential using for example\n [firebase.auth.GoogleAuthProvider.credential](/docs/reference/node/firebase.auth.GoogleAuthProvider#credential) depending on the\n credential provider id and complete the link.\n\nauth/credential-already-in-use\n: Thrown if the account corresponding to the credential already exists\n among your users, or is already linked to a Firebase User.\n For example, this error could be thrown if you are upgrading an anonymous\n user to a Google user by linking a Google credential to it and the Google\n credential used is already associated with an existing Firebase Google\n user.\n The fields `error.email`, `error.phoneNumber`, and\n `error.credential` ([firebase.auth.AuthCredential](/docs/reference/node/firebase.auth.AuthCredential))\n may be provided, depending on the type of credential. You can recover\n from this error by signing in with `error.credential` directly\n via [firebase.auth.Auth.signInWithCredential](/docs/reference/node/firebase.auth.Auth#signinwithcredential).\n\nauth/email-already-in-use\n: Thrown if the email corresponding to the credential already exists\n among your users. When thrown while linking a credential to an existing\n user, an `error.email` and `error.credential`\n ([firebase.auth.AuthCredential](/docs/reference/node/firebase.auth.AuthCredential)) fields are also provided.\n You have to link the credential to the existing user with that email if\n you wish to continue signing in with that credential. To do so, call\n [firebase.auth.Auth.fetchSignInMethodsForEmail](/docs/reference/node/firebase.auth.Auth#fetchsigninmethodsforemail), sign in to\n `error.email` via one of the providers returned and then\n [firebase.User.linkWithCredential](/docs/reference/node/firebase.User#linkwithcredential) the original credential to that\n newly signed in user.\n\nIndex\n-----\n\n### Properties\n\n- [code](/docs/reference/node/firebase.auth.AuthError#code)\n- [credential](/docs/reference/node/firebase.auth.AuthError#credential)\n- [email](/docs/reference/node/firebase.auth.AuthError#email)\n- [message](/docs/reference/node/firebase.auth.AuthError#message)\n- [name](/docs/reference/node/firebase.auth.AuthError#name)\n- [phoneNumber](/docs/reference/node/firebase.auth.AuthError#phonenumber)\n- [tenantId](/docs/reference/node/firebase.auth.AuthError#tenantid)\n\nProperties\n----------\n\n### code\n\ncode: string\nInherited from [Error](/docs/reference/node/firebase.auth.Error).[code](/docs/reference/node/firebase.auth.Error#code) \nUnique error code.\n\n### Optional credential\n\ncredential: [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential) \nThe [firebase.auth.AuthCredential](/docs/reference/node/firebase.auth.AuthCredential) that can be used to resolve the\nerror.\n\n### Optional email\n\nemail: string \nThe email of the user's account used for sign-in/linking.\n\n### message\n\nmessage: string\nInherited from [Error](/docs/reference/node/firebase.auth.Error).[message](/docs/reference/node/firebase.auth.Error#message) \nComplete error message.\n\n### name\n\nname: string\n| Inherited from [Error](/docs/reference/node/firebase.auth.Error).[name](/docs/reference/node/firebase.auth.Error#name)\n\n### Optional phoneNumber\n\nphoneNumber: string \nThe phone number of the user's account used for sign-in/linking.\n\n### Optional tenantId\n\ntenantId: string \nThe tenant ID being used for sign-in/linking. If you use\nfirebase.auth.Auth.signInWithRedirect to sign in, you have to\nset the tenant ID on Auth instanace again as the tenant ID is not\npersisted after redirection."]]
The account conflict error. Refer to firebase.auth.Auth.signInWithPopup for more information.
Common Error Codes
error.email
,error.phoneNumber
, anderror.credential
(firebase.auth.AuthCredential) may be provided, depending on the type of credential. You can recover from this error by signing in witherror.credential
directly via firebase.auth.Auth.signInWithCredential.error.email
anderror.credential
(firebase.auth.AuthCredential) fields are also provided. You have to link the credential to the existing user with that email if you wish to continue signing in with that credential. To do so, call firebase.auth.Auth.fetchSignInMethodsForEmail, sign in toerror.email
via one of the providers returned and then firebase.User.linkWithCredential the original credential to that newly signed in user.