I have the following scenario:
ASPNETZero .net core MVC v22.214.171.124
We published the MVC at https://mvc.onesamedomain.com
and HOST part at https://host.onesamedomain.com
We have an application running java, hosted at https://otherapp.ondedomain.com The user logs in to MVC generating the authentication TOKEN, which is sent to the java application.
How can I implement so that the Java App can consume the endpoints of https://host.onesamedomain.com with the authenticated token in the MVC environment?
We noticed that XSRF-TOKEN and Antiforgery Cookies are bounded to the full url site. If user login at https://mvc.onesamedomain.com they are not logged in at https://host.onesamedomain.com Is it possible to change this?
Could you help?
Is Your Java app a web application ?
Also, your java app can get a token during login (you can follow https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Infrastructure-Core-Mvc-Token-Based-Authentication) and use that token to make requests to Host API endpoint.
MVC application returns a cookie and you can't use it in another application.