firebase / firebase/firebase-admin-node

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

Đang mở
#2,096 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: auth
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.