firebase / firebase/firebase-admin-node

linking/unlinking providers with firebase-admin js sdk not working

オープン
#2,096 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
api: auth
主要言語
TypeScript
スター
1.7k
フォーク
419
平均マージ
3日 10時間
マージ済み PR(30日)
16

説明

### [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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。