Get environment configuration
const url = 'https://your-app.toriiauth.eu/_torii/environment';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://your-app.toriiauth.eu/_torii/environmentSingle discovery call. Returns the SDK’s env-public bundle.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”OK
Aggregated environment-public config the SDK uses on cold load.
object
Environment type literal (e.g. SANDBOX, PRODUCTION).
Cloudflare Turnstile site key. Null when CAPTCHA is disabled.
Legal-consent settings driving the signup form’s checkbox.
object
When true, the SDK signup form shows a checkbox the user must tick.
Public URL to the Terms of Service, or null.
Public URL to the Privacy Policy, or null.
OAuth providers enabled for this environment.
Single enabled OAuth provider as it appears in the boot bundle.
object
Whether end-user signup is allowed on this deployment.
Whether the “Powered by Torii.so” footer is required (tier gate).
Per-environment auth-method toggles driving which forms the SDK renders.
object
When true, the SDK renders the email + password sign-up form.
When true, the SDK renders the email + password sign-in form.
When true, sign-up sends a verification code before completing.
Whether multiple concurrent user sessions per client are enabled.
Hosted-portal (Shrines) config the portal app renders/redirects with.
object
The environment’s configured web origins — the portal validates its redirect_url handoff against these.
Organization boot config driving the SDK’s membership-required gate and create affordance.
object
Whether the organization module is enabled for this environment.
Whether a signed-in user must have an active organization to use the app (drives
Whether end-users may create their own organizations (drives the picker’s create affordance).
The locales this environment serves. Drives the SDK’s language set when no languages prop is passed.
object
The locales the SDK may render this environment’s auth UI in.
Locale to use when the visitor’s browser prefers none of the enabled ones.
Example
{ "locales": { "enabled": [ "en" ], "default": "en" }}