Skip to content

Google OAuth Setup

This page explains how to configure Google OAuth for SaasForgeKit.

Required environment variables

Set in .env:

env
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI="${APP_URL}/auth/google/callback"

Where to get Google keys

In Google Cloud Console:

  1. Create/select a project
  2. Configure OAuth consent screen
  3. Create OAuth 2.0 Client ID (Web application)
  4. Add authorized redirect URI:
text
https://your-domain.com/auth/google/callback
  1. Copy Client ID and Client Secret into .env

Redirect URI notes

  • URI must exactly match protocol, domain, and path
  • For local development, use your local app URL:
text
http://localhost/auth/google/callback

Enable in admin

After env values are set and app cache is refreshed, enable Google in:

text
Admin -> Settings -> Social Auth