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, an ID token or access token for Firebase.

Firebase-agnostic

No firebase dependency is pulled in. You get a Google credential and feed it to Firebase yourself: signInWithCredential(getAuth(), GoogleAuthProvider.credential(result.credential.idToken ?? null, result.credential.accessToken ?? null)). 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 on web, iOS, and Android in 3.x. Validate real sign-in with your app’s OAuth configuration before rollout. 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; web One-Tap returns an ID token and popup returns an access token, without a client secret.

Built and maintained by Ahsan Mahmood — LinkedIn · GitHub · npm