Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Gemstone.Web/Security/IAuthenticationWebBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,16 @@ private static async Task HandleLogoutRequestAsync(HttpContext httpContext)
// If the sign out procedure did not trigger any errors or redirects,
// this asks the cookie authentication scheme to redirect to the login page
if (IsSuccess(httpContext.Response.StatusCode) && !IsAjaxRequest(httpContext.Request))
await httpContext.ChallengeAsync(new AuthenticationProperties() { RedirectUri = "/" });
{
string redirectUri = httpContext.Request.PathBase.HasValue
? $"{httpContext.Request.PathBase}/"
: "/";

await httpContext.ChallengeAsync(new AuthenticationProperties()
{
RedirectUri = redirectUri
});
}
}

private static async Task HandleAccessDeniedAsync(HttpContext httpContext)
Expand Down