PrateekRathore-4047 avatar image
0 Votes"
PrateekRathore-4047 asked PrateekRathore-4047 edited

Adb2c SSO in MVC apps

I have 3 mvc apps and i am integrating adb2c sso.

My requirement is when i logged in 1st app and open 2nd app in same browser it will first check the azure session and if it presents then it will automatically logged in 2nd app and redirect to home page and if there is no azure session then it should just simply redirect to home page of web app.

Can any one help me on the above requriement?

Currently what happening if user not logged in any 3 apps and when i check azure session it will open sign form instead of redirecting to home page. as i am using below code on page load and on the behalf of this code either it will open sign in form or logged in the user and redirect to callback path.

if (!Request.IsAuthenticated)
HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/") });

otherwise, SSO works fine if i remove this code from page load and when user logged in 1st app and when user open 2nd app and click on login it automatically logged in without sign in form

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.

0 Answers