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

@ademhatay/expo-google-signin

v0.2.22

Published

Google Credential Manager native modules for React Native Expo

Readme

Contributors Forks Stargazers Issues MIT License

About The Project

@ademhatay/expo-google-signin provides a single JS API (signIn, signOut) and native implementations for both platforms:

  • Android: modern Credential Manager flow (One Tap and explicit Google button flow)
  • iOS: official GoogleSignIn native SDK

This lets you keep one auth integration across platforms while still using platform-native UX.

Built With

Getting Started

Prerequisites

  • Node.js LTS (20 or 22 recommended)
  • Expo SDK / React Native project
  • Google Cloud project

Installation

Expo managed or prebuild:

npx expo install @ademhatay/expo-google-signin

Bare React Native / Expo bare:

npm install @ademhatay/expo-google-signin
# or
bun add @ademhatay/expo-google-signin

Rebuild native apps after install:

npx expo run:android
npx expo run:ios

Google Cloud Setup (Required)

You must create OAuth clients in the same Google Cloud project.

1) Create Web OAuth Client (Required for all platforms)

Create OAuth client ID with type Web application.

Use this value as:

  • serverClientId in signIn(options)

Important: serverClientId must be Web Client ID, not Android/iOS client ID.

2) Create Android OAuth Client

Create OAuth client ID with type Android and enter:

  • Package name (exactly your Android app package)
  • SHA-1 certificate fingerprint(s)

Get SHA-1:

cd android
./gradlew signingReport

Add all relevant SHA-1 values (debug/release/play signing if applicable).

3) Create iOS OAuth Client

Create OAuth client ID with type iOS and enter:

  • Bundle identifier (must match your iOS app bundle ID)

4) Configure OAuth Consent Screen

If app is in Testing, add test user emails.

5) Configure Expo plugin for iOS

In your app config (app.json or app.config.ts), add plugin with iOS client ID:

{
  "expo": {
    "plugins": [
      [
        "@ademhatay/expo-google-signin",
        {
          "iosClientId": "YOUR_IOS_CLIENT_ID.apps.googleusercontent.com"
        }
      ]
    ]
  }
}

This writes GIDClientID and required URL scheme into Info.plist during prebuild.

Then rebuild iOS native project.

Usage

import { signIn, signOut } from '@ademhatay/expo-google-signin';

const user = await signIn({
  serverClientId: 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com',
  // Optional on iOS if plugin already set GIDClientID
  iosClientId: 'YOUR_IOS_CLIENT_ID.apps.googleusercontent.com',

  // Android options (ignored on iOS):
  signInButtonFlow: false,
  filterByAuthorizedAccounts: false,
  preferImmediatelyAvailableCredentials: false,
});

console.log(user.idToken);

await signOut();

Example env variables

EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=YOUR_WEB_CLIENT_ID.apps.googleusercontent.com
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=YOUR_IOS_CLIENT_ID.apps.googleusercontent.com

API Reference

signIn(options: GoogleSignInOptions): Promise<GoogleUser>

GoogleSignInOptions

  • serverClientId: string (required)
    • Web OAuth client ID from Google Cloud.
  • iosClientId?: string
    • iOS OAuth client ID. Optional if plugin sets GIDClientID in Info.plist.
  • nonce?: string
    • Optional nonce.
  • filterByAuthorizedAccounts?: boolean (Android)
  • preferImmediatelyAvailableCredentials?: boolean (Android)
  • signInButtonFlow?: boolean (Android)

Returns GoogleUser

  • id: string
  • idToken: string
  • displayName?: string
  • givenName?: string
  • familyName?: string
  • profilePictureUrl?: string
  • phoneNumber?: string

signOut(): Promise<void>

  • Android: clears credential manager state.
  • iOS: signs out current Google user.

Troubleshooting

serverClientId is required

  • Ensure Web client ID is passed.
  • Ensure env is loaded correctly.

Developer console is not set up correctly / DEVELOPER_ERROR

  • Android package name mismatch.
  • SHA-1 missing or wrong.
  • Wrong client ID type used in serverClientId.

iosClientId is required for iOS

  • Add iOS client ID via plugin config or pass iosClientId in signIn options.

iOS build fails with Expo config/plugin errors

  • Use Node LTS (20 or 22), avoid Node 25.
  • Reinstall pods and rebuild:
cd ios
pod install

iOS build succeeds but sign-in fails

  • Verify bundle identifier exactly matches iOS OAuth client.
  • Verify OAuth consent screen test users.

Contributing

PRs and issues are welcome.

  1. Fork the project
  2. Create branch
  3. Commit changes
  4. Push branch
  5. Open PR

License

MIT © Adem Hatay