Skip to main content

Registration Object Structure

The registration block controls which social login buttons appear and in what order, which email domains may sign up or sign in, and a few timing settings for social and OpenID logins. Turning registration and social login on or off is done with environment variables; see Authentication.

Example

# Example Registration Object Structure
registration:
  socialLogins: ["google", "facebook", "github", "discord", "openid"]
  allowedDomains:
    - "gmail.com"
    - "protonmail.com"
  oauthStateTtlMs: 600000
  openidDiscovery:
    startupAttempts: 1
    retryDelayMs: 5000

socialLogins

Key:

KeyTypeDescriptionExample
socialLoginsArray of StringsDefines the available social login providers and their display order.The order of the providers in the list determines their order on the login and registration pages. Valid values are google, facebook, github, discord, apple, openid, and saml. A provider only shows up if it is also configured with its environment variables. Default: google, facebook, openid, github, discord, saml.

Example:

socialLogins: ["google", "facebook", "github", "discord", "openid"]

allowedDomains

Key:

KeyTypeDescriptionExample
allowedDomainsArray of StringsA list of email domains allowed to register and sign in.Users whose email domain is not listed cannot register, and are also turned away when signing in through a social provider, OpenID, SAML, or LDAP, and when requesting a password reset. Domains must match exactly (subdomains are not included) and are compared case-insensitively. When omitted or empty, every domain is allowed.

Example:

allowedDomains:
  - "gmail.com"
  - "protonmail.com"

oauthStateTtlMs

Key:

KeyTypeDescriptionExample
oauthStateTtlMsNumberHow long, in milliseconds, a started social or OpenID login may take to reach its callback.Between 60000 (1 minute) and 3600000 (1 hour). Default: 600000 (10 minutes).

Example:

oauthStateTtlMs: 600000

openidDiscovery

Controls how IntelliAsk retries fetching the OpenID provider's discovery document. Each unset field falls back to its environment variable (OPENID_DISCOVERY_RETRY_ATTEMPTS, OPENID_DISCOVERY_RETRY_DELAY_MS), then to the default.

Keys:

KeyTypeDescriptionExample
startupAttemptsNumberDiscovery attempts made before startup continues.Between 0 and 100. 0 skips the startup attempts and only retries in the background. Default: 1.
retryDelayMsNumberMilliseconds between startup and background discovery attempts.Between 100 and 3600000. Default: 5000.

Example:

openidDiscovery:
  startupAttempts: 3
  retryDelayMs: 5000

Last updated on