firebase / firebase/firebase-admin-node

[FR] Add `returnUserInfo` to Admin SDK

Đang mở
#2,573 1 bình luận 0 reaction 1 người được giao Được @lahirumaramba nhận Xem trên GitHub
api: auth type: feature request
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ả

**Is your feature request related to a problem? Please describe.**
We currently cannot count the number of users using the Firebase Admin Auth SDK. However, this is available in REST API with more boilerplate.

**Describe the solution you'd like**
Add a `returnUserInfo` function to the Firebase Admin Auth SDK.

**Describe alternatives you've considered**
Running the REST API manually:
```ts
const url = `https://identitytoolkit.googleapis.com/v1/projects/${projectID}/accounts:query?alt=json`;
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token.access_token}`
},
body: JSON.stringify({
"returnUserInfo": false,
"expression": []
})
};

return await fetch(url, options).then(response => response.json());
```

**Additional context**
Should be simple to add.

J

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.