Hi! Question about redirecting after sign in...
# support-questions-legacy
d
Hi! Question about redirecting after sign in...
I am effectively trying to do SSO across subdomains. It is generally working well, but I have a question. I’ll use “example.com” in my question. Authentication is always on the subdomain auth.example.com, but sign out can happen from any subdomain. Suppose the user is using app.example.com. When the user is signed out, they are redirected a “signedOut” route, which shows a [sign in] button, so https://app.example.com/signedOut. User clicks on the [sign in] button on that page and gets redirected to auth.example.com for the sign in flow. I want to be able to redirect the user back from auth.example.com to where they started, i.e. https://app.example.com. I tried using the redirectToPath query param, but as the param pretty clearly states, it only works for paths. Is there a query param for urls? Or do I have to override an init config function? Or is there something else?
The example doesn't quite answer my question, or at least I am not seeing it. → Is there a query param for urls? Or do I have to override an init config function? Or is there something else?
r
So the query params doesn’t allow redirecting to a different domain (for security reasons)
But you can still achieve that by redirecting to a path on the auth.example.com which will further redirect the user to their sub domain
Now you could store which sub domain to redirect to based on some info stored in localstorage or frontend cookies.
d
Ok understood. Thanks!
8 Views