Stay organized with collections
Save and categorize content based on your preferences.
Properties
Optional email
email: string
Optional phoneNumber
phoneNumber: string
Optional tenantId
tenantId: string
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/node/firebase).\n- [auth](/docs/reference/node/firebase.auth).\n- AuthError \nThe account conflict error.\nRefer to firebase.auth.Auth.signInWithPopup for more information.\n\nCommon 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\nProperties\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\ncode \ncode: string\nInherited from [Error](/docs/reference/node/firebase.auth.Error).[code](/docs/reference/node/firebase.auth.Error#code) \nUnique error code.\n\nOptional credential \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\nOptional email \nemail: string \nThe email of the user's account used for sign-in/linking.\n\nmessage \nmessage: string\nInherited from [Error](/docs/reference/node/firebase.auth.Error).[message](/docs/reference/node/firebase.auth.Error#message) \nComplete error message.\n\nname \nname: string\n| Inherited from [Error](/docs/reference/node/firebase.auth.Error).[name](/docs/reference/node/firebase.auth.Error#name)\n\nOptional phoneNumber \nphoneNumber: string \nThe phone number of the user's account used for sign-in/linking.\n\nOptional tenantId \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.