firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

[FR] Add `returnUserInfo` to Admin SDK

Open jdgamble555 opened this issue 1 year ago • 1 comments

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:

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

jdgamble555 avatar May 27 '24 15:05 jdgamble555

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar May 27 '24 15:05 google-oss-bot