Hi Team, We are working on a setup involving multi...
# ask-a-descoper
a
Hi Team, We are working on a setup involving multiple independent websites that share a common user base. When a user logs in through Descope on any one of these sites, the application determines the user’s associated “base site” through a Profile API and then redirects the user to that base site after authentication. We’d like to confirm how the Descope session or authentication token can be revalidated or transferred between these separate top-level domains so that the user remains authenticated after redirection, without requiring a new login. Could you please clarify: • Does Descope support session continuity or revalidation across multiple distinct domains (not subdomains)? • If not, what is the recommended secure approach to re-establish or refresh the session on another domain using the existing Descope session or refresh token? • Are there any SDK methods or APIs specifically designed to handle such cross-domain session handoffs? Thanks in Advance!
m
a
@Meir Wahnon, Thanks for your reply. In my use case once user redirected to second domain along with session he/she will not have any session in first site. Step1- User navigate to site 1 as visitor. Step2- Login in site 1 and identiifed as user of Site2. Step3- Transfer user to the Site2 domain along with session. Step4- No more session access for user in Site 1 and in case try then circle back to Step #1. I hope scenario make sence to you. Please let me best way to achieve it in descope. Thanks!
m
can user belong to both site 1 and 2 ?
a
Yes, Can login from either of the site as user base is same. But there is a base site asscoiated with User. And once login we call the Profile API and get to know the base site. Then redirect to that site along with session.
If base site is same as the current logined site then continue in same site.
m
so I think best is to use this feature https://docs.descope.com/identity-federation/applications you can use
Application ID
to store the "site" association and redirect based on that, in your app
a
Okay, So it will transfer the session seamleasly but how about clear session from previous site. Is it manged out of the box or need additionla handling. Please suggest.
m
you will have the ssoAppId returned post login and in the flow: https://docs.descope.com/mobile-sdk/auth-helpers#manage-user
to identify the app user belongs to
a
Hi @Meir Wahnon, Any suggetion for this option- https://docs.descope.com/migrate/session-migration Instead of other Auth provider, is it transfer the session between 2 sites which using the same Descope Auth provider. Thanks in Advance!
m
Looping @Asaf Shen here
a
I don't think session migration fits here, we do session migration from specific vendor (e.g. Auth0), I would explore other ways (Federated applications)
a
Thanks @Asaf Shen and @Meir Wahnon, For confirming that this option will not help. Federated Applications approach will also not help in our use case as it works as SSO and once takes this route then other authentication options may not work as per the documentation. Limitation of SSO https://docs.descope.com/management/tenant-management/tenant#enforce-sso "_When enabled, this setting enforces SSO authentication for all users within the tenant. Users will be required to authenticate through the configured SSO provider (SAML or OIDC) and will not be able to use other authentication methods like passwords or magic links._"