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

docs(auth): update examples to use modular API #8327

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

Conversation

DoctorJohn
Copy link
Contributor

Description

This PR updates the authentication docs to use the modular API.

I just finished migrating an app to the modular API and put my insights into this PR hoping the next person can benefit from it.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • 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__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

I'll wait for the Vercel preview and then read the docs again. I already cross-checked the edits I made with my own code after the migration.

🔥


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Feb 13, 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 Feb 20, 2025 6:14pm

Copy link

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Mar 20, 2025
@DoctorJohn
Copy link
Contributor Author

Hi @mikehardy, IMHO the docs would still benefit from this PR. Thanks in advance for taking a look.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm 🤔 These aren't quite right though...

  • currentUser is accessed as auth.currentUser on the return value of getAuth()
  • all methods should be patterned as methodName(getAuth(), <params>)

so there should never be an auth import, and there shouldn't be any getAuth().methodName()

The modular sections of the e2e test suites are the working examples at the moment

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

Successfully merging this pull request may close these issues.

2 participants