firebase / firebase/firebase-tools
Auth Emulator don't raise 'auth/account-exists-with-different-credential' errors
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Describe your environment
* Operating System version: Windows 10 Home
* Browser version: Chrome 91.0.4472.114
* Firebase SDK version: 8.6.8
* Firebase Product: auth with emulators
### [REQUIRED] Describe the problem
When using the emulators `signInWithPopup` with two different providers (e.g. google and facebook) with the same email addresses **does not** raise the `auth/account-exists-with-different-credential` error .
The result that is returned is both providers linked to the same account. This does not emulate the real environment and makes testing code associated with linking accounts impossible in the emualtors.
Could also be an issue with `signInWithRedirect` I have not checked.
*Note:* `createUserWithEmailAndPassword` works as expected
#### Steps to reproduce:
1. Use emulators in project
2. Create an account using `signInWithPopup` with any provider
3. Create a second account with a different provider using `signInWithPopup` making sure to use the same account
4. Expect error: `auth/account-exists-with-different-credential` Does not arrive.
5. Check emaultor UI and find the accounts are now linked without you doing anything
*Note:* No errors are raised in this process to pass on.
Contributor guide
Assessment
This issue has not been assessed yet.