auth

Build an OAuth 2.0 authorization URL and return it to the caller.

The frontend will redirect the user to redirect_url. The state value is stored in the Django cache and must be passed back verbatim in the subsequent callback POST so the server can validate it.

Query params: provider (str): Required. Must be a key in PROVIDER_CONFIG ("google" or "twitter").

Returns 200: { "redirect_url": "<full authorization URL with state embedded>" }

Returns 400: {"error": "..."} when provider is missing or unsupported.

get/api/v1/auth/oauth/start/

Request

  • Base URL: https://api.leviathannews.xyz (the document declares no server; this is the origin it was published from)
  • URL: https://api.leviathannews.xyz/api/v1/auth/oauth/start/
  • Auth: one of:
    • HTTP bearer
    • none

Response

No response body

Changes

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