CORS - OPTIONS request blocked on userinfo request
See original GitHub issueHi guys,
Thank you for this great application. It saved us a lot of time.
If the client app is not served by the same server as our Django OIDC provider, the OPTIONS request triggered by the browser on the /openid/userinfo
URL fails for three reasons :
- because the
OPTIONS
HTTP verb is blocked by the application - because the
Authorization
header is not sent to the server in the OPTIONS preflight - because the
Authorization
header is not whitelisted in theAccess-Control-Allow-Headers
We coded a workaround on our side, but wanted to let you know of the problem. I would be surprised to be the first facing it.
If you have a recommanded solution, I would be happy to implement it.
All the best !
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cross-Origin Request Blocked for userinfo endpoint - Red Hat
Open browser console on non keycloak webpage 2.) Write request: fetch("https://<keycloak>/auth/realms/<realm>/protocol/openid-connect/userinfo")
Read more >CORS OPTIONS Succeeds but GET /connect/userinfo is stalled
The GET connect/userinfo causes a preflight OPTIONS request. ... and is noted as stalled in chromium-based browsers and blocked in Firefox.
Read more >Getting userinfo creates CORS error after successful login
The error I get: Error: "Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow- ...
Read more >OpenID Discovery document does not have CORS headers
For which Firefox shows me this error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https:// ...
Read more >OAuth/userinfo CORS support - DocuSign
When it wants to make an API call to api1.apis-are-us.net, the API call will be blocked by the browser, because the application's origin...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@juanifioren The spec also states:
Supporting OPTIONS is part of supporting CORS: https://www.w3.org/TR/access-control/. The preflight OPTIONS request is a side effect of a GET or POST request issued by the client. The OPTIONS implementation only needs to return the relevant headers – it does not need to carry out the full userinfo request or return the standard response body.
to be released on next version