Hi team,
-
Now, I have an issue with logout from project ASP.NET MVC 5.
-
In the backend, I have a controller with ActionResult as below
public ActionResult Logout() { CasAuthentication.SingleSignOut(); return RedirectToAction("Index", "Home"); }
-
I have a tag <a href="~/logout"> when user click this tag to logout, it will call ActionResult Logout and execute single sign out . Next, they redirect to CAS server login with URL 'url_cas?service=url_redirect_logout'.
-
We have a problem here, they will loop sign out (call again ActionResult Logout) when the user successfully log in again because the 'url_redirect_logout' will be redirected.
-
I see your code in function CasAuthentication.SingleSignOut, you use HttpContext.Current.Request in function ConstructServiceUrl, it will get the current request, specifically, in my case, it will get URL logout.
-
So, Could you suggest me some solutions to resolve this problem? I hope to hear from your team soon. Thank you so much.
Hi team,
Now, I have an issue with logout from project ASP.NET MVC 5.
In the backend, I have a controller with ActionResult as below
public ActionResult Logout() { CasAuthentication.SingleSignOut(); return RedirectToAction("Index", "Home"); }I have a tag
<a href="~/logout">when user click this tag to logout, it will callActionResult Logoutand execute single sign out . Next, they redirect to CAS server login with URL 'url_cas?service=url_redirect_logout'.We have a problem here, they will loop sign out (call again ActionResult Logout) when the user successfully log in again because the
'url_redirect_logout'will be redirected.I see your code in function
CasAuthentication.SingleSignOut, you useHttpContext.Current.Requestin functionConstructServiceUrl, it will get the current request, specifically, in my case, it will get URL logout.So, Could you suggest me some solutions to resolve this problem? I hope to hear from your team soon. Thank you so much.