How a person can sign in
const url = 'https://example.com/v1/auth/sign-in-options';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/auth/sign-in-optionsPublic: nobody is signed in yet. With email, the ways in for that email’s domain: the identity providers of the one tenant the domain is verified for (an unverified domain offers none), then any the deployment offers everyone it has added (owner: deployment, “Continue with Google”); without, an empty list: sign-in is email first, so nothing is offered before an email. methods says which ways in the deployment allows: identity providers, an API token (POST /v1/auth/token-sign-in), and an emailed sign-in link (emailLink, with a captcha site key when it needs one); identityProviders and apiToken both false when nobody can sign in to the console. Always mounted. The answer depends only on the domain: two people at the same domain get the same answer, whether or not either has an account. Rate-limited per client (429 rate-limit-exceeded, with Retry-After).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The email the person typed; only its domain is used.
Responses
Section titled “Responses”The ways to sign in (possibly none).
object
One way to sign in, as a sign-in page shows it.
object
“Sign in with …”.
Where the browser goes to start signing in with this provider.
Whose it is: a workspace’s own identity provider (tenant), or one the deployment offers everyone it has added (“Continue with Google”, deployment). A sign-in page shows a workspace’s own first. Absent: tenant.
The ways in this deployment allows, for a sign-in page to show. Absent from older servers.
object
Sign-in with an organization’s identity provider (email first).
Sign-in to the console with an API token (POST /v1/auth/token-sign-in).
The browser session cookie’s kind: secure (Secure and __Host-, kept by browsers only over https, and by some on http://localhost), or plain (development on a loopback address only, so every browser keeps it there). A sign-in page can check the browser keeps that kind before offering sign-in. Absent from older servers, and where there are no browser sessions: treat as secure.
Present when the deployment emails sign-in links: a sign-in page offers “Email me a sign-in link”. With captchaSiteKey, the request needs a Cloudflare Turnstile token (x-captcha-response).
object
Example
{ "data": [ { "owner": "tenant" } ], "methods": { "sessionCookie": "secure" }}email is not an email address.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Too many lookups from this client.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}