GET /v1/auth/config
What the sign-in page needs before anyone is signed in: whether email codes and GitHub sign-in work on this deployment, and the Cloudflare Turnstile site key and action to render the widget with before an email sign-in start (`POST /v1/auth/email/start` takes the widget's token as `turnstile_token`). `email.turnstile` is null and `email.enabled` false when the deployment has no Turnstile keys, and `email.enabled` is false when it has no mail service; a start then answers 503. Read it when the sign-in page loads; it is never cached.

Responses

200 The sign-in options of this deployment.
application/json
object string REQUIRED
Enum: auth_config
email object REQUIRED
Email code sign-in (`POST /v1/auth/email/start`).
enabled boolean REQUIRED
The deployment has a mail service and Turnstile keys, so a start can send a code.
turnstile object | null REQUIRED
What to render the Turnstile widget with before a start; null when the deployment has no Turnstile keys.
site_key string REQUIRED
The widget's public site key (`sitekey` in `turnstile.render`).
action string REQUIRED
The widget's `action`; the edge refuses tokens issued for any other.
Enum: email_sign_in
github object REQUIRED
GitHub sign-in (`GET /v1/auth/github`).
enabled boolean REQUIRED
The deployment has a GitHub OAuth app; when false, `GET /v1/auth/github` answers 501.
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta.b3os.org/v1/auth/config' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta.b3os.org/v1/auth/config', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta.b3os.org/v1/auth/config', headers=headers)print(response.json())
200 Response
{  "object": "auth_config",  "email": {    "enabled": true,    "turnstile": {      "site_key": "1x00000000000000000000AA",      "action": "email_sign_in"    }  },  "github": {    "enabled": true  }}
Ask a question... ⌘I