---
title: "Oauth State"
method: GET
path: "/api/auth/oauth-state"
tags: ["auth", "billing"]
---

# Oauth State

`GET /api/auth/oauth-state`

## Request

- Base URL: `https://www.oxfordledge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.oxfordledge.com/api/auth/oauth-state`
- Auth: none declared

Generate a CSRF state token for the OAuth flow.

The client includes this state in the OAuth authorize URL;
the server validates it on callback to prevent CSRF.

## Query parameters

- `provider` string

## Response `200`

Successful Response

- AuthActionResponse: Loose response_model for auth routes (signin/register/oauth callbacks). Multi-shape success vs error envelopes; FE branches on specific keys via the public typed wrappers.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api.md) · [All operations](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/revisions/e832a1260f0b?raw)
