How can I configure my Google identity platform to enforce 'single account per email address' rule without automatically linking credentials?
Expected (desired) behaviour:
- User login with Google
- User login with 3rd party authentication using the same email address
- Firebase auth should throw an error with code 'auth/account-exists-with-different-credential'
- Web application catches the error and asks the user to login with an existing provider before linking the user with the new credential from the SSO. (See: https://firebase.google.com/docs/reference/js/firebase.auth.Auth)
Actual behaviour:
- User login with Google
- User login with 3rd party provider using the same email address
- Google automatically links the user with the existing account
Note: this is a problem because 3rd party admin can potentially create a credential with any email address to hijack any account on our platform.
Background:
I'm using Firebase with Google Identity Platform enabled to integrate with 3rd party SSO. The identity platform has the following providers enabled:
- Anonymous
- Email / Password
- 3rd party authentication via OKTA
The identity platform does not have any tenant enabled.
In the firebase authentication, the 'One account per email address' option is enabled. This option appears to link to 'User account linking - link accounts with the same email address' option in Identity platform.