neosourceDocs
Search docs

OAuth provider callback

GET/api/auth/oauth/{provider}/callback

oauthCallback

Completes the OAuth handshake. Always a 303 redirect (top-level browser navigation): on success to `return_to`/`/` with session cookies; on email collision to `/login?reason=linking`; on failure to `/login?oauth_error=<reason>`.

Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.

curl

curl -X GET 'https://neosource.dev/api/auth/oauth/PROVIDER/callback?state=STATE&code=CODE'

fetch

fetch("https://neosource.dev/api/auth/oauth/PROVIDER/callback?state=STATE&code=CODE", {
  method: "GET",
});

Path parameters

providerrequired

One of: `github`. Extend as more providers come online.

string

Query parameters

staterequired

string

coderequired

string

Responses

303Redirect to the SPA (success, linking, or error)

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget