Skip to content

docs(auth): clarify fetchSignInMethodsForEmail behavior with email enumeration protection #8518

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

No898
Copy link

@No898 No898 commented May 7, 2025

docs(auth): clarify fetchSignInMethodsForEmail behavior with email enumeration protection

Description

This pull request clarifies the behavior of fetchSignInMethodsForEmail in the context of Firebase Authentication when Email Enumeration Protection is enabled (which is the default setting in Firebase).

The updated JSDoc comment explains that:

  • The method may return an empty array even for existing users,
  • Especially when called from an unauthenticated context,
  • This behavior is by design to prevent email enumeration attacks.

The goal is to help developers understand the limitations of this method and avoid using its result for direct user feedback about account existence, which could lead to security vulnerabilities.

Related issues

None reported, but this clarification aligns with security considerations discussed in firebase/firebase-js-sdk#4514.

Release Summary

Clarified the JSDoc for fetchSignInMethodsForEmail in the Auth module to include a note about email enumeration protection and its effects.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My change supports the following platforms:
    • Android
    • iOS
  • My change includes tests:
    • e2e tests added or updated in packages/**/e2e
    • jest tests added or updated in packages/**/__tests__
    • Not applicable (documentation only)
  • I have updated TypeScript types that are affected by my change (only JSDoc comment change).
  • This is not a breaking change.

Test Plan

No code changes — documentation only.


Think react-native-firebase is great? Please consider supporting the project:

…umeration protection

This update enhances the JSDoc comment for fetchSignInMethodsForEmail by explaining its behavior when "Email Enumeration Protection" is enabled in Firebase Authentication settings (which is the default). It notes that the method may return an empty array even for existing accounts when called from an unauthenticated context. This clarification aims to prevent confusion and potential misuse that could lead to security vulnerabilities.
@CLAassistant
Copy link

CLAassistant commented May 7, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

vercel bot commented May 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 1:15pm

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

Successfully merging this pull request may close these issues.

2 participants