-
Notifications
You must be signed in to change notification settings - Fork 9k
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
rfc6749 + CORS + OAuth #4930
Comments
Hi @micjaesc, OAuth and RFC6749 aside - almost any cross-domain request that any application in a browser makes requires CORS headers. You won't be able to talk to your authorization server at all without that enabled on the server side. |
if CORS support is missed by my token provider, then what is your opinion for such strict argue of RFC6749: |
@micjaesc, I'm not sure what you're getting at - we always send POST requests for tokens. Are you seeing something different? |
@shockey , before POST, the OPTIONS is sent (because of CORS). OPTIONS is not support by my token provider, and my question here, who interpret wrongly RFC6749. Swagger who uses token issuing on front, or my token provider who doesn't support CORS, because he sticks to sentence |
chrome-extensions support response_header overwriting, but not final HTTP status code (which is now 400). Using CORS proxy (like http://crossorigin.me) is not a option for us. Hmmm.. |
@micjaesc, it seems to me that your token provider is wrong. CORS is an additional browser security mechanism that exists outside of OAuth's request flow. When Swagger UI (or any web application) wants to talk to a cross-domain server, the user's browser puts that request on hold and sends out a preflight request that asks the server for security rules about what web pages are allowed to send requests to it - that's the OPTIONS request that you're seeing. Once the OPTIONS request is handled correctly (sending back 200 OK and setting the correct Doing so doesn't break OAuth's rules - the POST request is there as it should be, it's just that the token server needs to do more since browser security rules are involved. |
Closing due to inactivity. This is simply to keep our issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this issue. |
I just run to the same issue today. |
"the application flow is not intended to be used from browser," @t1gr4n Do you have any documentation to support this claim? |
My token's provider doesn't support CORS, and he argues with sentence from rfc6749
The client MUST use the HTTP "POST" method when making access token
In other hands, it is difficult for me to understand how to use swagger UI without CORS & different domains
So... did I miss something? Did I use swagger in wrong way? My understanding of OAuth is wrong... or my token's provider has weak argument?
Thank you for any comments, whole my swagger setup will be useless without authorization.
The text was updated successfully, but these errors were encountered: