Provider Configuration
Architecture
Section titled “Architecture”Provider credentials are configured globally via environment variables. Each application’s auth policy then controls which providers are available for that specific application.
.env (global) GOOGLE_CLIENT_ID=xxx GOOGLE_CLIENT_SECRET=xxx
↓
Admin Console Dashboard "Google: ✅ Configured"
↓
Application Auth Policy Allowed Providers: [email, google]A provider must be configured in .env before it can be enabled for any
application. The admin console Dashboard shows the configuration status
of every supported provider.
Email + Password
Section titled “Email + Password”No configuration required. Always enabled by default.
- No environment variables needed
- Better Auth handles password hashing (bcrypt)
- Password policy is configured per-application in Auth Policy
- Open the Google Cloud Console
- Create a project or select existing
- Navigate to APIs & Services → Credentials
- Create OAuth 2.0 Client ID (Web Application)
- Add authorized redirect URI:
(use your production URL in production)http://localhost:3000/api/auth/callback/google
- Copy Client ID and Client Secret
GOOGLE_CLIENT_ID=123456789-xxxxx.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxGitHub
Section titled “GitHub”- Open GitHub Developer Settings
- Create a new OAuth App
- Set Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Copy Client ID and generate a Client Secret
GITHUB_CLIENT_ID=Ov23lixxxxxxxxGITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxApple Sign In
Section titled “Apple Sign In”- Join the Apple Developer Program
- Navigate to Certificates, Identifiers & Profiles
- Register a Service ID
- Enable Sign In with Apple for the Service ID
- Create a Key (
.p8file) for Sign In with Apple - Your Team ID is visible in the Membership tab
APPLE_CLIENT_ID=com.example.serviceAPPLE_TEAM_ID=ABCDEF123APPLE_KEY_ID=XYZ789ABCAPPLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----...key content...-----END PRIVATE KEY-----"Verification
Section titled “Verification”After configuring providers:
- Restart the backend
- Open the admin console Dashboard
- Confirm the provider shows “Configured”
- Navigate to any application’s Auth Policy
- Toggle the provider in Allowed Providers
- Save — the provider is now available for that application’s users