Skip to content

Conversation

Copy link

Copilot AI commented Jan 27, 2026

The Logout method was declared as async Task without returning an IActionResult, preventing proper response handling by the ASP.NET Core framework.

Changes

  • Changed method signature to async Task<IActionResult>
  • Added RedirectToAction("Index", "Home") return statement after sign-out operations
[Authorize]
public async Task<IActionResult> Logout()
{
    var authenticationProperties = new LogoutAuthenticationPropertiesBuilder()
        .WithRedirectUri(Url.Action("Index", "Home"))
        .Build();

    await HttpContext.SignOutAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);
    await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
    
    return RedirectToAction("Index", "Home");
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: raynardlee <22081781+raynardlee@users.noreply.github.com>
Copilot AI changed the title [WIP] Update to address feedback from PR #417 Fix Logout method to return IActionResult Jan 27, 2026
Copilot AI requested a review from raynardlee January 27, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants