Owner: Engineering Team | Last Updated: 2026-01-30 | Status: Current
WWAI supports Google and Facebook OAuth for user authentication. Both providers are configured through the Django backend and integrated in the frontend via NextAuth.js. For the high-level auth overview, see Authentication Architecture.
| Setting |
Env Variable |
| Client ID |
GOOGLE_CLIENT_ID |
| Client Secret |
GOOGLE_CLIENT_SECRET |
- User clicks "Sign in with Google" on frontend
- NextAuth redirects to Google consent screen
- User authorizes → Google returns auth code
- Frontend sends code to
POST /api/user/login/google/
- Backend validates with Google, creates/finds user, returns JWT tokens
- Frontend stores tokens in NextAuth session
openid - Basic identity
email - Email address
profile - Name and profile picture
| Setting |
Env Variable |
| App ID |
FACEBOOK_CLIENT_ID |
| App Secret |
FACEBOOK_CLIENT_SECRET |
- User clicks "Sign in with Facebook"
- Redirect to Facebook authorization
- User authorizes → Facebook returns access token
- Frontend sends token to
POST /api/user/login/facebook/
- Backend validates, creates/finds user, returns JWT tokens
¶ Error Handling
| Error |
Cause |
Solution |
| OAuth redirect mismatch |
Callback URL not configured |
Add URL to provider console |
| Token validation failure |
Expired or invalid OAuth token |
Retry auth flow |
| Account already exists |
Email registered with different method |
Prompt user to login with original method |
| Date |
Author |
Change |
| 2026-01-30 |
Admin |
Initial creation |
Prev: JWT Token Flow | Next: Payment Architecture | Up: WalterWrites