Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access-Control-Allow-Origin issue on login #2102

Open
cforce opened this issue Nov 1, 2024 · 2 comments
Open

Access-Control-Allow-Origin issue on login #2102

cforce opened this issue Nov 1, 2024 · 2 comments

Comments

@cforce
Copy link
Contributor

cforce commented Nov 1, 2024

On initial request https://example.com i get below CORS issue i can't explain. The background image is loaded and login redirect did not happen. Then when i reload the page again the redirect works as expected

Access to fetch at 'https://login.microsoftonline.com/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/oauth2/v2.0/authorize?response_type=code+id_token&redirect_uri=https%3A%2F%example.com%2F.auth%2Flogin%2Faad%2Fcallback&client_id=XXXXXXXXXXXXXXXXXXXXXXXX&scope=api%3A%2F%2FXXXXXXXXXXXXXXXXXXXXXXXX.default+openid+profile+email+offline_access&response_mode=form_post&nonce=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&state=redir%3D%252Fauth_setup' (redirected from 'https://example.com/auth_setup') from origin 'https://example.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

@pamelafox
Copy link
Collaborator

I think @mattgotteiner has seen CORS issues in the past. Are you using user login on App Service with built-in auth? Or are you on Azure Container Apps?

@cforce
Copy link
Contributor Author

cforce commented Nov 1, 2024

It is fixed when I set ALLOW_ORGIN to my domain which shall not needed according to docs- is it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants