Sessions
Sign in with email and password to get an access token and a refresh token, renew them, and check which sign-in methods the server offers. Scripts and long-running integrations should use an API token instead of signing in with a password; see API Tokens.
📄️ Sign in and get tokens
Signs in with email and password and returns the access token and refresh token in the response body instead of cookies. Send the access token as `Authorization: Bearer <token>` and renew it with `POST /api/v1/auth/api-sessions/current/refresh` before it expires. For scripts and integrations, a long-lived API token is usually simpler.
📄️ Refresh tokens
Exchanges a refresh token obtained from `POST /api/v1/auth/api-sessions` (or the mobile sign-in) for a new access token and refresh token. Each refresh token works once: the previous one stops working, and presenting an already used refresh token again signs the session out.
📄️ Sign in with email and password
Signs in a browser user. On success the session is stored in a secure HTTP-only session cookie and the response describes the signed-in user. Fails when password login is disabled for this user. API clients that cannot use cookies should call `POST /api/v1/auth/api-sessions` or, better, use an API token.
📄️ Sign out
Ends the current session: the browser session cookie, or the API session whose access token is sent as `Authorization: Bearer`. The session stops working immediately and the session cookies are cleared. When the session was started with an OIDC provider that supports RP-initiated logout, `idpLogoutUrl` is the provider URL that ends the provider session too; otherwise it is null.
📄️ Get sign-in options
Returns which sign-in and registration methods are enabled on this server (password, OIDC), whether demo mode is on, and the available demo personas. It does not say who is signed in; use `GET /api/v1/users/me` for that.