@keel-ai/google-signin
v0.1.0
Published
Google Sign-In for Keel React Native apps. iOS: GoogleSignIn-iOS (SPM); Android: play-services-auth.
Maintainers
Readme
@keel-ai/google-signin
Google Sign-In for Keel React Native apps. Pairs with @keel-ai/apple-signin — iOS uses Apple Sign-In, Android uses Google Sign-In.
Why Keel ships this as a first-party package
- App Store / Play Store policy: if you offer non-Apple social login (Google / WeChat / etc.), you MUST also offer Apple Sign-In on iOS. Conversely on Android, Google Sign-In is the expected default. The Apple+Google pair is the engineering canonical for "two platforms, two providers".
- Community packages churn:
@react-native-google-signin/google-signinhas gone through multiple ABI breaks over the years. A first-party Keel package gives users a stable surface tied to the Keel SDK release cycle.
Install
keel install @keel-ai/google-signin
keel-module install @keel-ai/google-signin --host=.
cd ios && pod installUsage
import { signIn, isSupported, signOut } from '@keel-ai/google-signin';
import { Platform } from 'react-native';
if (await isSupported()) {
const result = await signIn({
webClientId: 'YOUR-CLIENT-ID.apps.googleusercontent.com',
scopes: ['email', 'profile', 'openid'],
});
// POST result.idToken to your server for verification (verify
// against Google's JWKS at https://www.googleapis.com/oauth2/v3/certs).
}Paired with Apple Sign-In
import { Platform } from 'react-native';
import * as apple from '@keel-ai/apple-signin';
import * as google from '@keel-ai/google-signin';
async function signIn() {
if (Platform.OS === 'ios') {
return apple.signIn({ scopes: ['email', 'name'] });
}
return google.signIn({ webClientId: 'YOUR-CLIENT-ID' });
}Server-side verification
Always verify idToken on YOUR server (never trust client-side
claims). Verify against Google's JWKS:
GET https://www.googleapis.com/oauth2/v3/certsMatch the kid in the JWT header, then verify the signature.
M1.5 — Credential Manager API
Android 14+ devices support androidx.credentials.CredentialManager,
which gives a unified sheet for Google + passkeys + saved
passwords. M1 uses the legacy play-services-auth; M1.5 swaps to
Credential Manager + falls back to legacy on older devices.
License
Apache-2.0
