Skip to content

Get environment configuration

GET
/_torii/environment
curl --request GET \
--url https://your-app.toriiauth.eu/_torii/environment

Single discovery call. Returns the SDK’s env-public bundle.

Host
string

OK

Media typeapplication/json

Aggregated environment-public config the SDK uses on cold load.

object
environment
required

Environment type literal (e.g. SANDBOX, PRODUCTION).

string
turnstileSiteKey

Cloudflare Turnstile site key. Null when CAPTCHA is disabled.

string | null
legal
required

Legal-consent settings driving the signup form’s checkbox.

object
requireConsent
required

When true, the SDK signup form shows a checkbox the user must tick.

boolean
termsOfServiceUrl

Public URL to the Terms of Service, or null.

string | null
privacyPolicyUrl

Public URL to the Privacy Policy, or null.

string | null
oauthProviders
required

OAuth providers enabled for this environment.

Array<object>

Single enabled OAuth provider as it appears in the boot bundle.

object
name
required
string
displayName
required
string
issuer
required
string
signupEnabled
required

Whether end-user signup is allowed on this deployment.

boolean
brandingRequired
required

Whether the “Powered by Torii.so” footer is required (tier gate).

boolean
auth
required

Per-environment auth-method toggles driving which forms the SDK renders.

object
emailSignUpEnabled
required

When true, the SDK renders the email + password sign-up form.

boolean
emailPasswordSignInEnabled
required

When true, the SDK renders the email + password sign-in form.

boolean
verifyEmailAtSignUp
required

When true, sign-up sends a verification code before completing.

boolean
multiSessionEnabled
required

Whether multiple concurrent user sessions per client are enabled.

boolean
portal
required

Hosted-portal (Shrines) config the portal app renders/redirects with.

object
enabled
required
boolean
primaryColor
string | null
backgroundColor
string | null
colorMode
string | null
hidePoweredBy
required
boolean
signInForceRedirectUrl
string | null
signInFallbackRedirectUrl
string | null
signUpForceRedirectUrl
string | null
signUpFallbackRedirectUrl
string | null
webOrigins
required

The environment’s configured web origins — the portal validates its redirect_url handoff against these.

Array<string>
organizations
required

Organization boot config driving the SDK’s membership-required gate and create affordance.

object
enabled
required

Whether the organization module is enabled for this environment.

boolean
membershipRequired
required

Whether a signed-in user must have an active organization to use the app (drives ).

boolean
allowUserCreatedOrganizations
required

Whether end-users may create their own organizations (drives the picker’s create affordance).

boolean
locales
required

The locales this environment serves. Drives the SDK’s language set when no languages prop is passed.

object
enabled
required

The locales the SDK may render this environment’s auth UI in.

Array<string>
Allowed values: en da
default
required

Locale to use when the visitor’s browser prefers none of the enabled ones.

string
Allowed values: en da
Example
{
"locales": {
"enabled": [
"en"
],
"default": "en"
}
}