question

TiwariVaibhav-3620 avatar image
0 Votes"
TiwariVaibhav-3620 asked TiwariVaibhav-3620 commented

Unable to retain user state when performing SSO using Azure B2c as redirect URI is pointing to homepage

have implemented Azure SSO using open ID connect, I am redirecting a user to the homepage of my portal once he is logged in using an office account.

The problem is since the redirect URL(localhost:443/abc/test.aspx) is a constant that we have to put, I could not figure out how to retain a URL where a user was before login (e.g. localhost:443/abc/test.aspx#/item/30176). After SSO login it redirect me to only localhost:443/abc/test.aspx, I want to land to localhost:443/abc/test.aspx#/item/30176 (30176 is variable item id)

If state is the only way to go. I could not find how to use it. Any references of implementation would really be helpful

azure-active-directoryazure-ad-saml-sso
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ricardosolisvillegas-4678 avatar image
0 Votes"
ricardosolisvillegas-4678 answered TiwariVaibhav-3620 commented

Hello @TiwariVaibhav-3620


I hope the following info will be useful as a reference as well how to prevent any misbehaviors.

https://auth0.com/docs/authenticate/login/redirect-users-after-login

https://auth0.com/docs/secure/attack-protection/state-parameters


Regards

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Using cookies can solve the problem if I am coming back to the site from where the login request is generated. If the login request generated from portal A and redirect URL is of another portal say portal b then session/cookies won't work.

Would there be some way out in this case.

0 Votes 0 ·