Files
turbostarter/.context/turbostarter-framework-context/sections/mobile/auth/oauth/google.md
Alejandro Gutiérrez 3527e732d4 feat: turbostarter boilerplate
Production-ready Next.js boilerplate with:
- Runtime env validation (fail-fast on missing vars)
- Feature-gated config (S3, Stripe, email, OAuth)
- Docker + Coolify deployment pipeline
- PostgreSQL + pgvector, MinIO S3, Better Auth
- TypeScript strict mode (no ignoreBuildErrors)
- i18n (en/es), AI modules, billing, monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:01:55 +01:00

3.6 KiB
Raw Blame History

title, description, url
title description url
Google Configure "Sign in with Google" for your mobile application. /docs/mobile/auth/oauth/google

Google

"Sign in with Google" enables a fast account-chooser experience on mobile (especially on Android). Configure your platform credentials, prompt the native account picker, then exchange the returned token on your backend to create a session with your auth server.

On Android, Google SignIn uses [Google Identity Services](https://developers.google.com/identity?hl=pl) and integrates with the system account chooser. On iOS, the recommended Expo flow uses [expo-auth-session](https://docs.expo.dev/versions/latest/sdk/auth-session/) with Google for a native, web-based sign-in experience.

Sign in with Google

Why use Google authentication?

Account picker and token storage integrated with the OS for speed and familiarity. Android native chooser; iOS polished experience via Expo. Tokens are verified server-side with [Better Auth](https://www.better-auth.com/docs/authentication/google) before a session is issued. Reduce friction with one-tap sign-in and fewer passwords to remember. Built on [Google Identity Services](https://developers.google.com/identity?hl=pl) and best-practice OAuth flows.

Requirements

Check the Better Auth documentation and @react-native-google-signin/google-signin documentation for steps to configure your server verification, client IDs and more.

High-level flow

  1. Configure Google OAuth Client IDs for Android and iOS in Google Cloud Console.
  2. Initialize the Google auth request in your app and render a "Sign in with Google" button.
  3. Prompt the account chooser; on success you receive an idToken and/or accessToken.
  4. Send the tokens to the API powered by Better Auth to verify and establish a session.
  5. Persist the session and proceed to the app.

For a more in-depth overview of Google authentication, including implementation details, platform caveats, and advanced configuration, see the following resources: