docs(auth): add Credential Manager Google Sign-In support and safety guards#9037
Conversation
…mples Avoid runtime errors when linking Google credentials while no user is signed in.
…entation Updated links in the social-auth documentation to ensure consistency and accuracy for the react-native-nitro-google-sign-in package.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Authentication documentation by introducing support for the Credential Manager API via the react-native-nitro-google-signin package. It also improves the robustness of existing social authentication guides by adding necessary safety checks and clarifying library-specific implementation details. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the Google social authentication documentation to introduce react-native-nitro-google-signin as a free alternative supporting Android's Credential Manager, comparing it with @react-native-google-signin/google-signin and providing updated code examples for both. The review feedback highlights potential runtime TypeError risks in the code snippets due to missing optional chaining on response.data, as well as several typos in the documentation URLs for both libraries.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| | Library | Credential Manager (Android) | Cost | Notes | | ||
| | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | ||
| | [`react-native-nitro-google-signin`](https://www.npmjs.com/package/react-native-nitro-google-signin) | Yes | Free (MIT) | Universal / One Tap-style API via [Nitro Modules](https://nitro.margelo.com); requires `react-native-nitro-modules` | | ||
| | [`@react-native-google-signin/google-signin`](https://github.com/react-native-google-signin/google-signin) | Yes with [Universal Sign-In](https://react-native-google-sign-in.github.io/docs/install); **no** on the free public `GoogleSignin` API | Paid for Credential Manager; free for legacy Android SDK | Universal Sign-In uses `GoogleOneTapSignIn`; the free public build is documented in the section below | |
…edential-manager-nitro
mikehardy
left a comment
There was a problem hiding this comment.
looks great. gemini missed on one in the review but the possibility of response.data being undefined seems legit and it's easy enough to do optional chaining. I've proposed two suggestions there which I'll be able to commit via github web UI once I finish the review. So I'll approve the PR, commit the suggestions, then squash-merge this in
Thanks!
Description
This PR updates the Authentication documentation to incorporate support for Google Sign-In using the new Credential Manager API via the
react-native-nitro-google-sign-inpackage. It also introduces safety improvements and link corrections in the social authentication guides.Key Changes:
react-native-nitro-google-sign-in.auth().currentUserbefore callinglinkWithCredential, preventing potential runtime errors.react-native-nitro-google-sign-inlibrary to ensure they point to the correct resources.Checklist