GetUserByEmail and/or getUsers should return all users[FR]
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- authentication, backend-api-design
Research direction
Start by locating the Admin Auth implementations of getUserByEmail and getUsers, then inspect how provider emails are currently matched. Compare their behavior with the Firebase Auth panel behavior described in the issue. Done means getUserByEmail returns the first matching user and getUsers returns every user matching the email across providers, with tests covering multiple providers and duplicate accounts.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Yes
It is very hard to search all the users by email when you allow the user to link multiple providers or if you allow multiple accounts with the same email.
Describe the solution you'd like
- The function "getUserByEmail" should return the first user that find where the email matches any of the emails found in its providers.
- The function "getUsers" should return a list of all the users that match that email in any of its providers.
Describe alternatives you've considered
We've been using a property to store the email as a record with the user data in firestore. But if you have any bug in any of your versions that list will break. It even becomes harder when you allow for multiple accounts and multiple provider linking in the same account.
We've consider using auth triggers in functions to keep that list updated, but there are no triggers when a user updates their auth credentials.
Additional context
Also as the feature "fetchSignInForEmail" and others like it are being removed for security purposes this feature is going to become even more useful and needed, and the admin is the perfect place to do it.
Also this is the behavior you get when searching for an email in the firebase auth panel.
Thank you very much for the great work. If I can help in any way I'll be happy to :)
Hope you have a great day.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-node
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
firebase/firebase-admin-node#3234 ·
-
firebase/firebase-admin-node#3221 · 3 comments · 1 assignee ·
-
api: messaging
Difficulty 3/5 1-2 days Newbie friendliness 70/100
firebase/firebase-admin-node#3215 ·
-
api: messaging
Difficulty 5/5 Over a week Newbie friendliness 28/100
firebase/firebase-admin-node#3214 ·
-
api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 comment · 1 assignee ·
All issues in firebase/firebase-admin-node
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
joinmarket-webui/jam#1496 · 1 comment ·
-
Tech
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
opencrvs/opencrvs-core#13865 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/twake-calendar-frontend#1377 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EclipseFdn/open-vsx.org#13385 · 1 comment ·