Installation
There are two ways to consume the package: paid and free.
Why paid? According to the State of React Native Survey, unmaintained packages are the #1 pain point of the React Native ecosystem. Your purchase enables the module reliability, and contributions to upstream SDKs such as 1, 2, 3.
Universal Sign In (premium)
⭐️ Key Features:
-
Cross-Platform: Unified APIs which work on Android, iOS, Web, and macOS.
- Android: Built with Credential Manager library
- Web: Uses Sign In with Google for Web
- iOS & macOS: Powered by the Google Sign-In SDK
-
Trusted: A total of over 170k npm package downloads.
-
Faster Sign-Ups: Reduce sign-up and sign-in times on Android by up to 50%, according to Google.
-
See the UI: screenshots of the features.
🛡️ Advanced security features
🔧 Easier setup - Automatic detection of configuration parameters for faster integration.
📱 An example app - to showcase all features on native and web
Public version (free)
Available on the public npm registry under MIT license, this version:
- Uses the functional, but deprecated legacy Android Google Sign-In which will be removed from the Google Play Services Auth SDK (
com.google.android.gms:play-services-auth
) later in 2025. The free package will continue to use a version where the deprecated SDK is present. - Has platform support limited to Android and iOS.
- Contains none of the extra features listed above.
If you want to migrate from the public version to the Universal version, follow the migration guide.
Obtaining Universal Sign In
Universal sign in requires purchasing a license, after which you will be able to configure your (or your colleagues') access to the private npm package and to the private repo with the sources and examples.
Are you an EAS customer? You may be able to access the premium version for free, learn more.
Accessing the private npm package
The private npm package is like any other, but it's hosted on the GitHub npm packages registry, not the public npm registry. Therefore, a small bit of setup is needed:
-
Obtain here a Personal Access Token with
packages:read
permission. -
Set up your package manager to fetch the package from the GH packages registry. In this example, we're using an
NPM_TOKEN_GOOGLE_SIGN_IN
environment variable.
- yarn v3+
- npm / yarn v1
create a .yarnrc.yml
file in your project root with the following content:
npmScopes:
react-native-google-signin:
npmRegistryServer: https://npm.pkg.github.com
npmAuthToken: '${NPM_TOKEN_GOOGLE_SIGN_IN}'
create a .npmrc
file in your project root with the following content:
//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 setting up a custom registry.
Installing
- yarn
- npm
yarn add @react-native-google-signin/google-signin@latest
npm i @react-native-google-signin/google-signin@latest
After installing: if you're using the Universal version, open the lockfile (yarn.lock
/ 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 - try uninstalling and reinstalling the package.
There are several guides to follow now:
- Expo guide for native mobile apps built with Expo
- Web guide if you want to use the package on web
- If you're not using Expo but plain React Native, follow Android guide and iOS guide
Requirements
The packages support last 3 stable releases of React Native. Unofficially, they may work with older versions too.
If you're using the New Architecture, it's strongly recommended to use the latest React Native version available.