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

@obitrain/react-native-google-auth

v0.2.2

Published

Google sign-in for Obitrain: GoogleSignIn SDK on iOS, Credential Manager on Android (Nitro module)

Readme

@obitrain/react-native-google-auth

Google sign-in as a Nitro module: GoogleSignIn SDK on iOS, Credential Manager + AuthorizationClient on Android. Alternative to @react-native-google-signin/google-signin.

Usage

import { GoogleAuth } from '@obitrain/react-native-google-auth';

// once at startup — webClientId is the OAuth *web* client id (token audience)
GoogleAuth.configure({ webClientId: GOOGLE_ID });

const { user, errorCode, errorMessage } = await GoogleAuth.signIn();
if (user) sendToBackend(user.idToken);

await GoogleAuth.signOut();

errorCode: cancelled | inProgress | playServicesNotAvailable (Android) | noCredential (no usable Google account / nothing to restore) | error (details in errorMessage).

Beyond the basic flow

// extra scopes and/or a one-time code the backend exchanges for tokens
// (Android may show a consent screen after the account sheet)
const { user, serverAuthCode, grantedScopes } = await GoogleAuth.signIn({
  scopes: ['https://www.googleapis.com/auth/fitness.activity.read'],
  offlineAccess: true,
});

// no-UI sign-in for returning users (previously authorized account only)
const silent = await GoogleAuth.signInSilently();

// best-effort unlink of the app from the Google account
await GoogleAuth.revokeAccess();

// Android: verify Play Services, optionally showing Google's fix-it dialog
const ok = await GoogleAuth.checkPlayServices();

Setup

iOS — the iOS client id is read from the app's GoogleService-Info.plist (CLIENT_ID), or pass iosClientId to configure. The app must declare the reversed client id as a URL scheme (CFBundleURLSchemes). No AppDelegate change: the redirect is picked up from React Native's RCTOpenURLNotification.

Android — nothing beyond the dependency; no google-services.json requirement and no Play Services version pin in the app's build.gradle. Sign-in is Credential Manager (authentication only); scopes / offlineAccess run the separate Authorization flow, so serverAuthCode comes from a second, cached consent step rather than the sign-in sheet itself.

Development

yarn            # install
yarn nitrogen   # regenerate nitrogen/ after touching src/*.nitro.ts
yarn typecheck
yarn prepare    # full bob build (nitrogen + module + types)

Releasing

Merging to main never publishes. To release, open a release PR:

yarn release 0.2.0

It bumps package.json on a release/0.2.0 branch and opens a PR whose description (drafted from the commits since the last tag) becomes the release notes — edit it before merging. Merging the PR runs release.yml: npm publish through trusted publishing, tag v0.2.0 and the GitHub release.

License

MIT