Skip to main content
v0.1.0Nitro 1.0 · Swift · Kotlin

Google Sign-In
for NitroUI.

Credential Manager on Android and the Google Sign-In SDK on iOS, behind one typed API. Returning users, incremental scopes, fresh tokens and server auth codes.

$bun add nitro-google-signin

Two platforms. One API.

The library wraps each platform's current Google identity SDK and smooths over the differences that matter to your app.

Everything the sign-in flow needs

From the first tap to the token your backend verifies, with the same TypeScript API on Android and iOS.

From tap to backend in three lines

Configure once, sign in from your button, and hand a fresh ID token to every request. The full API is there when the helpers are not enough.

Read the guides
import { getIdToken, GoogleSignIn, signInWithGoogle } from 'nitro-google-signin'

// Once at startup. Client IDs come from the native config.
GoogleSignIn.configure()

// From your sign-in button. undefined when the user cancels.
const session = await signInWithGoogle()
if (session !== undefined) await sendToBackend(session.idToken)

// Per request: valid for at least five more minutes.
const idToken = await getIdToken() // undefined when signed out
11
GoogleSignIn methods
10
Typed error codes
iOS 16+
Google Sign-In SDK 10.1
API 26+
Credential Manager 1.6

Ship Google Sign-In today.

Create the OAuth clients, add three keys to .env, and call signInWithGoogle().

Start the setup