-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CORS errors when using client-side webapp #939
Comments
Current (dirty) workaround for NGINX proxy:
|
Possibly resolved by documenting the existing CORS setup #1025 ? |
Probably better, but still not resolved since the options request should respond with something like
Instead of that I got a redirect. It looks like dex does handle options request with an authentication flow or something. https://stackoverflow.com/questions/22972066/how-to-handle-preflight-cors-requests-on-a-go-server |
@ericchiang Probably fixed with this commit. We are checking this in production today. |
I'm writing a native app and webapp with in reactJS and react-native.
At the moment I'm struggling with the webapp sending preflight requests.
When the webapp is doing a OPTIONS request to /dex/token
It keeps returning
{"error":"invalid_client","error_description":"Invalid client credentials."}
Since the browsers automatically strips the Authorization headers for preflight requests I would like if the OPTIONS request won't be authenticated anymore.
Source:
https://www.w3.org/TR/cors/#preflight-request
(...) using the method OPTIONS, and with the following additional constraints:
(...)
Exclude the author request headers.
Exclude user credentials.
(...)
The text was updated successfully, but these errors were encountered: