How to set Path for ASP.NET Core Identity cookie
I have an ASP.NET Core MVC application that also hosts an API. The site uses Identity defaults so when you log in a cookie is set. The API has been configured to use JWT Bearer authentication.
When I deploy this to our IIS server, I give each app a virtual path like so:
Site 1: /SPA Site 2: /API
When I deploy this to IIS, I notice that the cookie Path is set to "/API".
This is not the desired behaviour as the SPA app thinks I am not authenticated.
I want to be able to override this and set the cookie path explicitly to root "/".
How do I set the the cookie path while still allowing for JWT Bearer authentication?