Skip to content

Cookie based session auth#115

Merged
madeyoga merged 19 commits intomainfrom
cookie-based-session
Oct 16, 2025
Merged

Cookie based session auth#115
madeyoga merged 19 commits intomainfrom
cookie-based-session

Conversation

@madeyoga
Copy link
Copy Markdown
Owner

@madeyoga madeyoga commented Oct 14, 2022

@madeyoga madeyoga added the new-feature New feature label Oct 14, 2022
Comment on lines +65 to +71
public virtual async Task<IResult> Logout(IHttpContextAccessor contextAccessor)
{
var context = contextAccessor.HttpContext!;
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);

return Results.NoContent();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public virtual async Task<IResult> Logout(IHttpContextAccessor contextAccessor)
{
var context = contextAccessor.HttpContext!;
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
return Results.NoContent();
}
public virtual IResult Logout()
{
return Results.SignOut(authenticationSchemes: new[] { CookieAuthenticationDefaults.AuthenticationScheme });
}

@madeyoga madeyoga linked an issue Oct 16, 2025 that may be closed by this pull request
@madeyoga madeyoga merged commit 8a5d6a5 into main Oct 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add swagger 'Authorization' feature

2 participants