firebase / firebase/firebase-admin-node
firebase-auth updateUser with providerToLink using "password" as providerId
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
Hey I'm trying to link providerData with providerId = "password" using firebase admin SDK
environment :
- Firebase SDK version: 10.0.2
- Firebase Product: auth
- Node.js version: 16.13.0
- NPM version: 8.1.0
The problem
I'm trying to link providerData using firebase admin SDK in order to link providerData with providerId = "password" .
I'm using updateUser method and pass providerToLink object in order to link providerData.
updateUser method will return this error :
- code : auth/invalid-provider-id
- message : The providerId must be a valid supported provider identifier string.
Relevant Code:
await admin
.auth()
.updateUser(user.uid, {
providerToLink: {
uid: user.email,
email: user.email,
displayName: user.displayName,
providerId: 'password',
},
})
.catch((error: any) => {
console.error(`${error}`);
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at admin.auth().updateUser and its providerToLink handling, then trace validation of providerId="password". Reproduce the report with the stated SDK and Node.js versions and check the Firebase Auth API contract; done means the behavior is clarified or corrected and covered by focused validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, nodejs, typescript
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100