Cookie Authentication fails when hosted on Azure #5731
Unanswered
Thebenmandude
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I am having an issue with authenticating a user from a 3rd party app when hosting serenity. I have an Angular application that does a get request to my serenity instance, sets the appropriate cookies and then I can make calls to any of the endpoints. The problem I am having is that this only works when I host the serenity instance on localhost, actually running IISExpress out of Visual Studio. As soon as I deploy the site to Azure App Service this no longer works as the cookies are not set as expected. To further confuse me, I can make the same calls to the hosted environment using Postman and it works. This obviously results in Access Denied as I can no longer authenticate.
Also, the hosted site is fully functional when login into the site itself. I have tried almost all combinations of setting Samesite values, change CORS configurations, ignoring the antiforgery tokens etc...
I have even deployed both apps to azure "app1.azurewebsites.net" and "app2.azurewebsites.net" to figure out it the difference in domains is causing this but that did not work also.
I am sure I am doing something wrong but I cannot figure out what it is.
Beta Was this translation helpful? Give feedback.
All reactions