Last post Apr 07, 2017 02:41 AM by Lorris
Mar 29, 2017 08:45 AM|jelato|LINK
I have multiple applications that need a single sign on mechanism. I have followed this tutorial, http://arunendapally.com/post/implementation-of-single-sign-on-(sso)-in-asp.net-mvc however
this one uses forms authentication while I need to use Asp.Net Identity. I already added the machine key in web.config files of all my applications and adding this code below in say "Application A" makes it redirect to the said login page however it seems
that the authentication cookie is not working in "Application A" cause it just redirects to the login page since "Application A" has an "authorize" attribute in the controller of the main page.
<forms name="singlesignoncookie" loginUrl="https://sample.com/Account/Login" timeout="12000"/>
Any help would be highly appreciated. Thank you very much.
Mar 30, 2017 06:19 AM|Zhi Lv - MSFT|LINK
however it seems that the authentication cookie is not working in "Application A" cause it just redirects to the login page since "Application A" has an "authorize" attribute in the controller of the main page.
From your description, do you mean it will redirect to login page if user want to access the main page? If that is the case, I suggest you check your code whether you have set the authorization.
More details about Form authentication and authorization, see:
Mar 30, 2017 06:27 AM|jelato|LINK
But the thing is I am using Asp.Net Identity and not forms authentication so I'm really not sure how it should be implemented in Asp.Net Identity.
Apr 07, 2017 02:41 AM|Lorris|LINK
take a look at this thread:
you create a ClaimsIdentity and then use the AuthenticationManager from the OWINContext to "SignIn" the identity and that creates the authentication cook