Google OAuth callback
Handles the redirect back from Google. On success it: 1. Creates the identity + profile on first sign-in, or links to the existing identity. 2. Issues `peridot_access` and `peridot_refresh` cookies. 3. Redirects to the `CLIENT_SUCCESS_URL` configured on the server. Both cookies are `HttpOnly; SameSite=Lax`. In production the `Secure` flag is set. **Browser-navigation only.** Google redirects the browser here; do not call it directly via `fetch()`.
Handles the redirect back from Google. On success it:
- Creates the identity + profile on first sign-in, or links to the existing identity.
- Issues
peridot_accessandperidot_refreshcookies. - Redirects to the
CLIENT_SUCCESS_URLconfigured on the server.
Both cookies are HttpOnly; SameSite=Lax. In production the Secure flag is set.
Browser-navigation only. Google redirects the browser here; do not call it
directly via fetch().
Response Body
application/json
curl -X GET "https://example.com/auth/google/callback"Redirect to Google OAuth consent screen GET
Redirects (HTTP 302) to Google's OAuth consent screen with `scope=profile email`. **Browser-navigation only.** Open the URL in a browser tab (top-level navigation); it cannot be called via `fetch()` or the Swagger "Send" button — the cross-origin redirect to Google is blocked by CORS and appears as `Failed to fetch`, which is expected. Not meant to be called directly by clients — use `POST /auth/login` to obtain the URL.
Start Google login POST
Returns the URL a client should navigate to in order to begin Google OAuth. The URL points to `GET /auth/google`, which redirects the browser to Google's consent screen. After the user consents, the browser is redirected back through `/auth/google/callback` and session cookies are set.