Or Vaknin
03/11/2026, 10:36 PMDevRev
03/11/2026, 10:36 PM// Extract tenant from subdomain
const subdomain = window.location.hostname.split('.')[0]; // 'mycustomer' from '<http://mycustomer.venice.io|mycustomer.venice.io>'
// Use in SSO initiation
const descopeSdk = useDescope();
await descopeSdk.sso.start(subdomain, redirectURL, loginOptions);
Dynamic SSO Redirect URIs
Descope supports dynamic redirect URLs using tenant information . You can configure redirect URLs with template variables like {{tenant.name}} or {{tenant.domain}} in your SSO settings. When the flow is triggered from an IdP app, Descope will automatically substitute these variables with the actual tenant values.
For IdP-initiated flows, the redirect URL configured in your SSO settings will be used, and the tenant context will be preserved through the authentication process.
Cookie Domain Configuration
Cookie domain settings are configured at the project level through your custom domain setup . Descope sets cookies with SameSite=Strict on your configured custom domain and its subdomains. You'll need to set up a CNAME record pointing to Descope's servers, and cookies will be accessible across all subdomains of your configured domain.
The cookie domain cannot be set per-tenant - it's a project-wide setting that applies to all authentication sessions.
SSO with Client SDK | Descope Documentation
SSO Settings Guide | Descope Documentation
Refresh Token Storage in Project | Descope Documentation