Following the guide from this previous post, I have implemented the only answer from this post in my application. But when I try to actually POST to the action, I get the error "No service for type 'Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter' has been registered."
The browser has the token in the cookie, and the Interceptor is appending the token to the request header as "X-XSRF-TOKEN" like I'd expect. The issue is that it no longer hits the API when I add the attribute [ValidateAntiforgeryToken] over one action I'm using to test, but does when I remove it.
I cannot show the code due to privacy reasons, but trust that I have followed the previous example closely. Have I missed something somewhere else? the error makes me think that this only works with razor pages, but my app doesn't use razor pages at all. I am using a SPA design in angular 9 with asp.net core 3.1 API backend
Any advice would be greatly appreciated.
Thanks!