Skip to content

BlazorWeb antiforgery issue on SignInAsync. #50760

@ssperoniGIT

Description

@ssperoniGIT

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The edit form already has AntiforgeryToken >.

Login with httpContext.SignInAsync, then logout with httpContext.SignOutAsync.
Then login again from same page.
I get the following msg:
'A valid antiforgery token was not provided with the request. Add an antiforgery token, or disable antiforgery validation for this endpoint.'

Expected Behavior

Be able to Login a second time from same page.

Steps To Reproduce

Project with minimal code;
https://github.com/ssperoniGIT/BlazorWeb-antiforgery-issue-on-login.

chrome-capture-2023-8-17b

Exceptions (if any)

No response

.NET Version

8-rc.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions