firebase / firebase/firebase-admin-node
linking/unlinking providers with firebase-admin js sdk not working
- Lingua principale
- TypeScript
- Stelle
- 1.7k
- Fork
- 419
- Merge medio
- 3g 10h
- PR unite (30g)
- 16
Descrizione
### [REQUIRED] Step 2: Describe your environment
* Operating System version: macOS 12.6
* Firebase SDK version: 11.5.0
* Firebase Product: auth
* Node.js version: 16.17.1
* NPM version: 9.4.0
### [REQUIRED] Step 3: Describe the problem
#### Steps to reproduce:
I'm trying to link the email provider to a user.
Code runs without issues, but applies no changes.
Unlinking also not working.
#### Relevant Code:
Scenario:
user is linked to apple and google providers, aim is to unlink those and add email provider instead.
```ts
import * as admin from 'firebase-admin';
process.env['GOOGLE_APPLICATION_CREDENTIALS'] = './firebase_token.json';
admin.initializeApp();
const auth = admin.auth();
const userId = '';
const email = '';
auth.updateUser(userId, {
providersToUnlink: ['apple.com, google.com'],
providerToLink: {
providerId: 'email',
email,
},
})
```
Script exits without issues, changes not applied. User still has apple and google provider but no email provider.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with the auth.updateUser call shown in the issue and reproduce it using Node.js 16.17.1, Firebase SDK 11.5.0, and the listed provider setup. Compare the resulting provider state with the requested link/unlink behavior; done means the user no longer has Apple and Google providers and has the email provider.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- node.js, typescript
- Ambito
- authentication
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100