Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetUserByEmail and/or getUsers should return all users[FR] #2430

Open
Flucadetena opened this issue Jan 24, 2024 · 2 comments
Open

GetUserByEmail and/or getUsers should return all users[FR] #2430

Flucadetena opened this issue Jan 24, 2024 · 2 comments

Comments

@Flucadetena
Copy link

Flucadetena commented Jan 24, 2024

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.

@google-oss-bot
Copy link

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.

@gabaudette
Copy link

gabaudette commented Apr 18, 2024

I have the exact problem right now, the fact that there's no other way than loading all users or alternative shown by op and manually match to an email/provider combinaison is a real pain even more painful when you have (as mentionned by op) "multiple accounts and multiple provider linking in the same account."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants