Skip to content

docs(auth): add Credential Manager Google Sign-In support and safety guards#9037

Merged
mikehardy merged 6 commits into
invertase:mainfrom
rutvik24:docs/auth-google-credential-manager-nitro
Jun 4, 2026
Merged

docs(auth): add Credential Manager Google Sign-In support and safety guards#9037
mikehardy merged 6 commits into
invertase:mainfrom
rutvik24:docs/auth-google-credential-manager-nitro

Conversation

@rutvik24

@rutvik24 rutvik24 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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-in package. It also introduces safety improvements and link corrections in the social authentication guides.

Key Changes:

  • Credential Manager Support: Added comprehensive documentation and code examples for implementing Google Sign-In using react-native-nitro-google-sign-in.
  • Safety Improvements: Updated existing Google Auth examples to include a safety check for auth().currentUser before calling linkWithCredential, preventing potential runtime errors.
  • Link Corrections: Fixed documentation links for the react-native-nitro-google-sign-in library to ensure they point to the correct resources.

Checklist

  • I have read the CONTRIBUTING.md guide.
  • I have updated the documentation accordingly.
  • My changes follow the existing style and conventions of the project.

rutvik24 added 3 commits June 2, 2026 11:17
…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.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Credential Manager Support: Added comprehensive documentation and code examples for implementing Google Sign-In using the react-native-nitro-google-signin library.
  • Safety Improvements: Updated social authentication examples to include null checks for auth().currentUser before calling linkWithCredential to prevent runtime errors.
  • Documentation Updates: Corrected documentation links and clarified the usage of revokeAccess across different Google sign-in libraries.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/auth/social-auth.mdx Outdated
Comment thread docs/auth/social-auth.mdx Outdated
Comment thread docs/auth/social-auth.mdx Outdated
| 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 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

There is a typo in the documentation URL for @react-native-google-signin/google-signin. It should be react-native-google-signin.github.io instead of react-native-google-sign-in.github.io.

Comment thread docs/auth/social-auth.mdx
Comment thread docs/auth/social-auth.mdx

@mikehardy mikehardy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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!

Comment thread docs/auth/social-auth.mdx
Comment thread docs/auth/social-auth.mdx Outdated
Comment thread docs/auth/social-auth.mdx Outdated
Comment thread docs/auth/social-auth.mdx Outdated
Comment thread docs/auth/social-auth.mdx Outdated
@mikehardy mikehardy enabled auto-merge (squash) June 4, 2026 13:16
@mikehardy mikehardy disabled auto-merge June 4, 2026 13:17
@mikehardy mikehardy merged commit 41c408c into invertase:main Jun 4, 2026
6 checks passed
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