firebase / firebase/firebase-admin-node

[FR] Add `returnUserInfo` to Admin SDK

Aperta
#2,573 1 commento 0 reazioni 1 assegnatario Rivendicata da @lahirumaramba Vedi su GitHub
api: auth type: feature request
Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
3g 10h
PR unite (30g)
16

Descrizione

**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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.