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

Add "authorization" to allowed CORS headers for oauth/userinfo requests #5675

Closed
hubgit opened this issue Oct 24, 2019 · 0 comments · Fixed by #5712
Closed

Add "authorization" to allowed CORS headers for oauth/userinfo requests #5675

hubgit opened this issue Oct 24, 2019 · 0 comments · Fixed by #5712

Comments

@hubgit
Copy link
Contributor

hubgit commented Oct 24, 2019

I'm using the oidc-client library to authenticate users in a web browser (Chrome 77, in this case), and after successfully authenticating a user with ORCID it makes a cross-domain request to fetch the user's profile information.

Unfortunately an OPTIONS request to https://sandbox.orcid.org/oauth/userinfo fails: the request contains a Access-Control-Request-Headers: authorization header but the response has only access-control-allow-headers: X-Requested-With,Origin,Content-Type,Accept,x-csrf-token - authorization is missing from the allowed headers.

Would it be possible to add authorization to the list of allowed headers?

hubgit added a commit to hubgit/ORCID-Source that referenced this issue Dec 11, 2019
Requests to `/oauth/userinfo` are authenticated using a Bearer token in the `Authorization` header, so this needs to be added to the list of allowed headers in `Access-Control-Allow-Headers`.

fixes ORCID#5675
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

Successfully merging a pull request may close this issue.

1 participant