-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
How to reproduce these conditions
Sample name or URL where you found the bug
https://github.com/firebase/functions-samples/blob/master/spotify-auth/functions/index.js
My code is the same as in the sample
The Error i am getting:
Error: The email address is already in use by another account.
at FirebaseAuthError.Error (native)
at FirebaseAuthError.FirebaseError [as constructor] (/user_code/node_modules/firebase-admin/lib/utils/error.js:25:28)
at new FirebaseAuthError (/user_code/node_modules/firebase-admin/lib/utils/error.js:90:23)
at Function.FirebaseAuthError.fromServerError (/user_code/node_modules/firebase-admin/lib/utils/error.js:114:16)
at /user_code/node_modules/firebase-admin/lib/auth/auth-api-request.js:350:45
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
The code had been working as expected for the past couple of weeks. Now i am getting an error that the user email is already in use by another account when i try to sign in to an account i have previously signed into. This does not seem correct as in the code it seems that it should update the user rather than try and create another account when one already exists? Although it does work, and an access token is saved in the database, it does not redirect to the index.html page and show the users login info.