Skip to content

[SingleSignOut] Loop when use CasAuthentication.SingleSignOut in ActionResult #110

@KhanhVanCong

Description

@KhanhVanCong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions