New Blazor Web App, Password Reset "A valid antiforgery token was not provided"

46 Views Asked by At

I've created a new Blazor 'Web App' project in .net 8.

I include 'Individual Accounts' when setting up the project.

I've setup email delivery and try a password reset. It sends the reset email first, I click then enter the email and new passwords, upon doing that I get this error:

"A valid antiforgery token was not provided with the request. Add an antiforgery token, or disable antiforgery validation for this endpoint."

This is an out of the box solution, I haven't changed anything. This can't be right?

I've researched this and it talks about various things that don't apply here, eg https://github.com/dotnet/aspnetcore/issues/50760

However it relates to login. Someone suggests this "use app.UseAntiforgery() after app.UseAuthentication()" - but 'UseAuthentication' isn't present in Program.cs.

This surely shouldn't fail like this out of the box, any idea how I can fix this?

Thanks

0

There are 0 best solutions below