-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logout not Working (BlazorWebAssemblyStandaloneWithIdentity) #132
Comments
Thanks @Softwerker04 ... I'll take a look. We just performed an update that might have accidentally broken it. |
Yep! We broke it! Jeremy is the sample author, and he supplied some code to prevent posting anything but an empty JSON message |
@JeremyLikness ... The logout code that you sent is failing, placing the logout in a nasty loop on the following exception ...
|
@Softwerker04 ... Until Jeremy comes in with a fix, you can change to the prior code. You can see it on the PR diff ...... https://github.com/dotnet/blazor-samples/pull/130/files |
Jeremy, the code is ... app.MapPost("/logout", async (
SignInManager<AppUser> signInManager,
[FromBody]object empty) =>
{
if (empty is not null)
{
await signInManager.SignOutAsync();
return Results.Ok();
}
return Results.NotFound();
}).RequireAuthorization(); ... and I've temporarily reverted the sample back to the prior code with a note (code comment) to see this issue. |
@guardrex, @JeremyLikness After changing the handler for logout endpoint the mechanism seems to work. Great job, thanks a lot for your support!!! |
@Softwerker04 Can you explain what you did? Having the same issue. |
Revert to the prior code for now ... |
Got it. Works. Thanks. |
Describe the issue
After register a new user and login the logout is not working. The screen is flickering and the user is not logged out.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User should become logged out
.NET Version
8.0.100
Issue Details
⚠ Do not edit this section. It is required for issue processing.
The text was updated successfully, but these errors were encountered: