I'm trying to use firebase admin SDK in order to link the Email/Password sign-in method.
Based on firebase documentation we can links user to a specific provider https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updaterequest.md#updaterequestprovidertolink
based on that I'm using :
await admin
.auth()
.updateUser(user.uid, {
providerToLink: {
uid: user.email,
email: user.email,
displayName: user.displayName,
providerId: 'password',
},
})
.catch((error: any) => {
console.error(`${error}`);
});
It should link the Email/Password sign-in method to a specific user, but instead of that it's returning error with
auth/invalid-provider-idThe providerId must be a valid supported provider identifier string.facebook.com or google.comQuestion
Is there is another providerId I should use in order to link the Email/Password sign-in method ?
Is there another approach I should use in order to link the Email/Password sign-in method ?
Node version : 12
firebase-admin : 9.12.0