Skip to main content

Installation

There are two ways to consume the package:

Available to GitHub sponsors of the maintainer and Expo customers, this version includes:

⚑️Modern Sign In implemented with:

πŸ›‘οΈ Advanced security features

πŸ”§ Easier configuration - some parameters can be detected automatically

πŸ–₯️ Full platform support - Deploy everywhere with a unified api: Android, iOS, Web, and macOS

βœ… An example app - to showcase all Modern Sign In features

Your support helps improve the module and upstream SDKs (such as 1, 2). Thank you for enabling better tools for the community! ❀️

Public version​

Available on the public npm registry, this version:

  • Has platform support limited to Android and iOS.
  • Uses functional, but deprecated Legacy Android Google Sign-In.
  • Contains none of the extra features listed above.

Obtaining access to the Modern version​

You can get access either by sponsoring (use specifically the tiers that mention this project!) or as an Expo customer through this form. Note that this version is distributed under a custom license. You will receive an invitation to access the private repo with the sources and examples, as well as to the private npm package.

Three steps are needed to access the private package, which is hosted on GitHub npm packages registry.

  1. Become a sponsor or complete the form and accept the private repository invitation.

  2. Obtain here a Personal Access Token with packages:read permission.

  3. Set up your package manager so that it fetches the package from the GH packages registry instead of the public registry. In this example, we're using an NPM_TOKEN_GOOGLE_SIGN_IN environment variable.

create a .npmrc file in your project root with the following content:

.npmrc
//npm.pkg.github.com/:_authToken=${NPM_TOKEN_GOOGLE_SIGN_IN}

@react-native-google-signin:registry=https://npm.pkg.github.com/

If you use another package manager (such as Bun), refer to its documentation on how to set up a custom registry.

Requirements​

The package supports Expo SDK >= 50 / React Native >= 0.73. Unofficially, it may work with older versions, but it's not guaranteed.

If you're using the New Architecture, it's strongly recommended to use the latest React Native version available.

Installing​

yarn add @react-native-google-signin/google-signin@latest

If you're using the Modern version, open the npm lockfile (yarn.lock or package-lock.json) and verify that the package is fetched from the GitHub registry (the entry must point to npm.pkg.github.com, not registry.npmjs.org). If it does not, it means that your package manager is not configured correctly.

There are several guides to follow now: