authentication
authentication
google-oauth2

Google Login

Initiate Google OAuth2 login flow.

Generates OAuth2 authorization URL with CSRF state token.

Args: redirect_uri: Optional custom redirect URI (defaults to configured URI) return_to: If provided, auto-redirects browser to Google (for iOS/browser users) invite: Optional closed-beta invite token (#1581). Its hash is bound to this flow's state for the signup gate; malformed values are ignored. accepted_terms: The terms version the person agreed to on the sign-in page (#1665). Bound to this flow's state; ignored while TERMS_VERSION is empty. link_proof: This sign-in proves the account for an identity link (#1818): Google is asked for auth_time, and the callback records it from the verified ID token. Ordinary sign-ins send the same request as before.

Returns: If return_to: RedirectResponse to Google OAuth (browser user) Otherwise: JSON {authorization_url, state} (API client)

Example: GET /api/v1/auth/google/login (API client) Response: {"authorization_url": "...", "state": "..."}

GET /api/v1/auth/google/login?return_to=... (browser user)
Response: 303 Redirect to Google OAuth

Note: Frontend should redirect user to authorization_url. State token is stored in Redis for CSRF validation.

get/api/v1/auth/google/login

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/auth/google/login
  • Auth: none declared

Query parameters

redirect_uristring nullable
return_tostring nullable
add_accountboolean
invitestring nullable
accepted_termsstring nullable
link_proofboolean

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.