I have an Azure App Service with an Angular App as Docker container.
Everything works fine.
Now I want to add a security layer and activate the AAD authentication in the App Service configuration.
I have added the Azure identity provider and I can login and everything works without problems for the first time.
But when I try to open the app again I am being redirect to the Azure login but after that redirected to "https://mydomain.com/.auth/login/aad/callback" and nothing happens.
On the browser console I can see the following messages.
Access to fetch at 'https://login.windows.net/...' (redirected from 'https://mydomain.com/...') from origin 'https://mydomain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I have my own authentication with JWT Tokens in my angular app and don´t want to use an integrated solution for now.
I only want to use the App Service authentication as a basic authentication but it only works the first time or if I delete my browser cache.
I am not sure what I am doing wrong. Can anyone help me?