firebase-js-sdk
firebase-js-sdk copied to clipboard
Microsoft SSO returns error: `auth/account-exists-with-different-credential`
Operating System
MacOS 12.6.6
Browser Version
Chrome 120
Firebase SDK Version
9.15.0
Firebase SDK Product:
Auth
Describe your project's tooling
React app with webpack and jest, bootstrapped by NX
Describe the problem
After configuring our app in Azure and creating a Microsoft Business account (which gives me a *@*.onmicrosoft.com
email address), we can successfully login (using the popup method), but Firebase returns the following error: auth/account-exists-with-different-credential
. However, there is no existing account with that email address.
Steps and code to reproduce issue
const provider = OAuthProvider('microsoft.com');
provider.setCustomParameters({ prompt: 'select_account' });
await signInWithPopup(auth, provider);
After investigating this further, in a project where we didn't upgrade the authentication to use Identity Platform, using microsoft as IdP worked. After upgrading that project as well, we get the same error, so issue seems to stem from Identity Platform.
Does that ring any bells?
Hi @doender,
I believe your question is better answered by our backend team and isn't quite in the domain of the SDK teams. I see that it's been a while. If you still have questions I recommend reaching out to the Firebase Support team directly. Thanks!