Skip to content

SPA code sample adds two cookies #13369

@iantonge

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

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions