firebase / firebase/firebase-admin-node

firebase-auth updateUser with providerToLink using "password" as providerId

Open
#1,592 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api: auth
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.