npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pricava/react-native-google-credential

v1.0.0

Published

React Native-first Google credential sign-in with Expo support.

Downloads

272

Readme

React Native Google Credential

Open-source Google credential sign-in for React Native and Expo applications.

Use one typed API to acquire a Google ID token across Android, iOS, and web:

  • Android: Credential Manager with Google ID credentials.
  • iOS: Native Google Sign-In.
  • Web: Google Identity Services.

The package gives Android applications a modern alternative to legacy Google Sign-In token acquisition while keeping application code consistent across every supported platform.

Why this package?

  • One TypeScript API and one credential result shape.
  • Android Credential Manager instead of deprecated Android Google Sign-In APIs.
  • Native account selection on Android and iOS.
  • Google Identity Services and FedCM support on web.
  • React Native TurboModule support.
  • Expo config plugin and development-build support.
  • Firebase Auth, Supabase, and Clerk integrations.
  • Custom integration factories for backends and advanced provider flows.

Installation

npm install @pricava/react-native-google-credential
yarn add @pricava/react-native-google-credential
pnpm add @pricava/react-native-google-credential

Basic usage

import { signInWithGoogleCredential } from "@pricava/react-native-google-credential";

const credential = await signInWithGoogleCredential({
  webClientId: process.env.GOOGLE_WEB_CLIENT_ID!,
  iosClientId: process.env.GOOGLE_IOS_CLIENT_ID,
});

await authenticate({
  idToken: credential.idToken,
});

The package selects the correct native or web implementation internally. Your application does not need to branch on Platform.OS.

Platform support

| Platform | Credential experience | Implementation | | --- | --- | --- | | Android | Native Google account picker | Android Credential Manager | | iOS | Native Google sign-in | GoogleSignIn iOS SDK | | Web | Google account prompt | Google Identity Services | | Expo web | Web account prompt | Google Identity Services | | Expo development build | Native platform flow | React Native native module |

Expo Go's native app cannot load custom native modules. Use Expo web to test the web implementation or an Expo development build to test Android Credential Manager and native Google Sign-In on iOS.

Authentication adapters

Many authentication providers default to browser-based social OAuth in React Native applications. These helpers connect the native Google account experience to the provider session.

Firebase Auth

import { getAuth } from "@react-native-firebase/auth";
import { createFirebaseGoogleAuth } from "@pricava/react-native-google-credential/adapters/firebase";

const signInWithGoogle = createFirebaseGoogleAuth({
  auth: getAuth(),
  webClientId,
  iosClientId,
});

Supabase

import { createSupabaseGoogleAuth } from "@pricava/react-native-google-credential/adapters/supabase";

const signInWithGoogle = createSupabaseGoogleAuth({
  supabase,
  webClientId,
  iosClientId,
});

Clerk

import { createClerkGoogleAuth } from "@pricava/react-native-google-credential/adapters/clerk";

const signInWithGoogle = createClerkGoogleAuth({
  clerk,
  webClientId,
  iosClientId,
  callbackOptions: {
    signInFallbackRedirectUrl: "/",
  },
});

Each provider also exposes a custom integration factory for backend exchanges, analytics, account linking, and manual provider flows.

Configuration

Create a Google OAuth Web client for the ID token audience. iOS also requires an iOS OAuth client and its reversed client ID URL scheme.

GOOGLE_WEB_CLIENT_ID=...
GOOGLE_IOS_CLIENT_ID=...
GOOGLE_IOS_URL_SCHEME=...

For Android, register the package name and signing certificate fingerprints in Google Cloud or Firebase. For web, register every authorized JavaScript origin.

Advanced options

const credential = await signInWithGoogleCredential({
  webClientId,
  iosClientId,
  nonce,
  android: {
    flow: "sign-in-button",
    accountFilter: "authorized-first",
    autoSelect: true,
  },
  web: {
    autoSelect: true,
    useFedCm: true,
  },
});

Lower-level exports such as signInAsync, isAvailableAsync, and clearCredentialStateAsync remain available for advanced usage.

Documentation

See the project documentation for platform setup, Expo configuration, adapters, API details, and troubleshooting.

Project direction

The core package remains focused on reliable Google credential acquisition. Provider adapters will continue expanding so applications can preserve a native Google sign-in experience with their preferred authentication platform.

License

MIT