/{app_slug}/v1/auth/email/configWhat a sign-in page needs to offer email sign-in
Public. The app's display name, whether email sign-in is on and what the email carries, and the CAPTCHA site key when bot protection is on. Says nothing about any account.
Path parameters
app_slug*stringSlug of the app.
Response · 200 The public email sign-in settings of this app.
app_name*stringThe app's display name, for the page heading.
Example: "Acme"
enabled*booleanWhether email sign-in (link or code) can be used on this app right now.
delivery*objectWhat the email carries; null when email sign-in is off.
ttl_minutes*numberMinutes a code or link stays valid; null when off.
Example: 10
bot_protection*objectSet when every start needs a `bot_protection_token` from this widget.
Example
Request
GET https://api.auth.productcraft.co/{app_slug}/v1/auth/email/configimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const consumerEmailSignInConfig = await auth.consumer("my-app").email.config();auth.consumer(…).email.config(options?): Auth.ConsumerEmailSignInConfig
Response
{
"app_name": "Acme",
"enabled": false,
"delivery": {},
"ttl_minutes": 10,
"bot_protection": {}
}