You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Were you able to successfully deploy your functions?
Yes
Expected behavior
I'm trying to insert two user with same email address but with different phone number.
When configure sign-in methods I setup only phone number as authentication provider (Email/password disabled) and I allowed multiple accounts with the same email address.
@katowulfsame error of #101 but probably different causes
The snipped code of the function (onWrite) trigger from location /USERS in the Database:
constauth=admin.auth();/* ... */if(!event.data.previous.exists()){constuserData=event.data.current.val();console.log(`A new user was created: ${uid}. Now syncing in Auth...`,userData);returnauth.createUser({uid: uid,email: userData.email,phoneNumber: userData.phone,disabled: false}).then(userRecord=>{console.log(`Done. Created new user in Auth: ${uid}`,userRecord);returnPromise.resolve(uid);}).catch(error=>{console.error(`Error Creating new user in Auth: ${uid}`,error);sendEmail.logEmail(/* ... */);returnPromise.reject(`${error}`);});}
All ok when I enter the first user. The error occurs on the second (with the same email)
the log
Error Creating new user in Auth: -Ku_GnJvedvEbtfgn0xP { 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:39:28)
at new FirebaseAuthError (/user_code/node_modules/firebase-admin/lib/utils/error.js:104:23)
at Function.FirebaseAuthError.fromServerError (/user_code/node_modules/firebase-admin/lib/utils/error.js:128:16)
at /user_code/node_modules/firebase-admin/lib/auth/auth-api-request.js:399:45
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
errorInfo:
{ code: 'auth/email-already-exists',
message: 'The email address is already in use by another account.' } }
The text was updated successfully, but these errors were encountered:
Hi
Version info
firebase-functions: ^0.6.3
firebase-admin: ^5.2.1
Were you able to successfully deploy your functions?
Yes
Expected behavior
I'm trying to insert two user with same email address but with different phone number.
When configure sign-in methods I setup only phone number as authentication provider (Email/password disabled) and I allowed multiple accounts with the same email address.
@katowulf same error of #101 but probably different causes
The snipped code of the function (onWrite) trigger from location
/USERS
in the Database:All ok when I enter the first user. The error occurs on the second (with the same email)
the log
The text was updated successfully, but these errors were encountered: