`get_user_by_email` can silently return wrong result when "allow multiple accounts with the same email address" is set
@Xiaoshouzi-gh is already working on this.
Since Jan 14, 2025.
Assessment
This issue has not been assessed yet.
Description
Describe your environment
- Operating System version: macOS 15.2
- Firebase SDK version:
6.6.0 - Firebase Product:
auth - Python version:
3.12 - Pip version:
uv 0.5.11
Describe the problem
I'm worried that the get_user_by_email function misleadingly silently skips some results.
It's typed as returning a single user record given an email address:
However, it is possible to configure Firebase to allow multiple accounts with the same email address: https://support.google.com/firebase/answer/9134820
It looks like the implementation takes just the first user record if more than one matches the provided email:
I'd suggest replacing it with a get_users_by_email that returns a collections of records, to avoid misleading programmers unfamiliar with the "allow multiple accounts with the same email address" option.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 359
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 2
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-python
-
api: remoteconfig
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
firebase/firebase-admin-python#957 · 1 comment ·
-
api: database type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/firebase-admin-python#978 · 1 comment ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Openapi: auth
firebase/firebase-admin-python#949 · 2 comments · 1 reaction · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
firebase/firebase-admin-python#945 · 1 comment · 1 reaction ·
All issues in firebase/firebase-admin-python
Similar issues
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Diaoul/subliminal#1382 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100