Skip to main content

Capacitor Auth Manager Docs

Firebase-agnostic Google sign-in for web and Capacitor — one API on web, iOS, and Android.

The same Google call everywhere

auth.signIn(AuthProvider.GOOGLE) routes to GoogleSignIn on iOS, Credential Manager on Android, and Google Identity Services on the web — one call, the same result.idToken on every platform.

Firebase-agnostic

No firebase dependency is pulled in. You get a Google id token and feed it to Firebase yourself: signInWithCredential(getAuth(), GoogleAuthProvider.credential(result.credential.idToken)). Identical on web and native.

A capacitor-google-auth alternative

A drop-in alternative to @codetrix-studio/capacitor-google-auth that you own — using the modern Android Credential Manager and GoogleSignIn SDKs, with the id token moving from result.authentication.idToken to result.credential.idToken.

Framework-agnostic

A core singleton (works like Zustand — no context providers) with first-class adapters for React hooks, Vue composables, an Angular service/module/guard, and plain vanilla JS.

Google-first, growing

Google is enabled and verified on web + iOS + Android in 2.4.x. The other 14 providers are being re-enabled one at a time; until then they throw AuthErrorCode.PROVIDER_NOT_ENABLED.

TypeScript-first & secure by default

Every option, credential, result, and error code is typed. No secrets are persisted by default; the web flow returns an id token only (no client secret, no backend required).

Built and maintained by Ahsan Mahmood LinkedIn · GitHub · npm