Authentication

Sign in an auth user

Changed on

Authenticate with email and password. Requires an anon key.

Set session_mode to cookie to request HttpOnly refresh-token storage. Cookie mode is honored only for an exact, credentialed CORS origin on the same schemeful site as this API. Otherwise the response retains the refresh token in its body. A frontend on its default Volcano URL is cross-site with this API and so always gets the body token.

post/auth/signin

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    HTTP bearer

Headers

X-Volcano-Proxy-Authorization, string

Trusted server-side auth proxy credential in Bearer SERVICE_KEY form. When supplied, X-Volcano-Client-IP is also required. The service key must belong to the anon key's project and hold this operation's scope: auth.signup for signup and anonymous signup, auth.signin for signin and OAuth code exchange, auth.refresh for refresh, auth.logout for logout, and auth.password_reset for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code.

X-Volcano-Client-IP, string

Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid X-Volcano-Proxy-Authorization header.

Request body

object required
email, string required
password, string required
session_mode, 'cookie'

Response

Signin successful

AuthTokenResponse required
access_token, string required

JWT access token (expires after configured lifetime)

token_type, string required
expires_in, integer required

Access token lifetime in seconds

refresh_token, string

Long-lived token for getting new access tokens. Omitted when the request uses eligible HttpOnly cookie session storage.

user, AuthUser required

Example response

{
  "token_type": "bearer"
}

Changes

    • info

      added the new optional header request parameter X-Volcano-Client-IP

    • info

      added the new optional header request parameter X-Volcano-Proxy-Authorization

    • breaking

      the response's body type changed from no type to object for status

    5 more changes in this revision