Start Google login
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.
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.
Response Body
application/json
application/json
curl -X POST "https://example.com/auth/login"{ "url": "http://localhost:3301/v1/auth/google"}Google OAuth callback GET
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()`.
Log out POST
Revokes the current refresh token and clears both session cookies. Idempotent — safe to call when already logged out.