Configure Google and GitHub OAuth authentication for OpenLIT using NextAuth.js
Access Google API Console
Create or Select Project
Enable Required APIs
Setup Consent Screen
Add Test Users (Development)
Create Web Application Credentials
Configure Redirect URIs
Save Credentials
Access GitHub Developer Settings
Register New OAuth Application
http://localhost:3000
(development) or https://yourdomain.com
(production)Generate Client Secret
Update OAuth App URLs
https://yourdomain.com
to origins and https://yourdomain.com/api/auth/callback/google
to redirect URIshttps://yourdomain.com/api/auth/callback/github
HTTPS Requirement
OAuth button not appearing
Redirect URI mismatch error
Invalid client error
NEXTAUTH_URL mismatch
NEXTAUTH_URL=http://localhost:3000
for developmentNEXTAUTH_URL=https://yourdomain.com
for production