Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SPA code sample adds two cookies #13369

Description

@iantonge

After copying the code sample provided for use with AngularJS, I noticed that two antiforgery cookies are being added: XSRF-TOKEN and .AspNetCore.Antiforgery.xxxxxxxxxxx. This appears to be because we're calling antiforgery.GetAndStoreTokens(context) rather than antiforgery.GetTokens(context).

Given that GetAndStoreTokens will add the cookie on our behalf anyway, maybe the sample should just set the name of the cookie when configuring the service (which is what I have done in my application).


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions