Initiate Google OAuth
Auth
Google OAuth
Initiate a Google OAuth 2.0 login flow.
GET
Initiate Google OAuth
GET
/api/auth/google-auth/callback endpoint, which issues a local JWT and redirects to the frontend.
Scopes requested: openid, profile, email
Flow
- Browser navigates to
GET /api/auth/google-auth - Server redirects → Google’s consent screen
- User approves → Google redirects to
GET /api/auth/google-auth/callback?code=... - Server exchanges code for profile, creates/finds user, issues JWT
- Server redirects to frontend:
https://app.webyes.com/auth/callback?token=<jwt>
Callback Parameters
string
required
OAuth authorization code from Google. Handled server-side automatically.
string
CSRF state value. Handled server-side automatically.
Response
302 Redirect to the frontend app with the JWT token as a query parameter.
Response
302
Redirect to Google OAuth