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

oauth2: Add text/javascript as a possible response content-type when validate token #306

Closed
DartBot opened this issue Jun 5, 2015 · 4 comments
Labels
package:oauth2 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

Originally opened as dart-lang/sdk#17067

This issue was originally filed by orig...@gmail.com


https://codereview.chromium.org/177093006

Some api providers like dropbox (for example /token endpoint) set content-type response to text/javascript so _validate call fail.

Unhandled exception:
FormatException: Invalid OAuth response for "https://api.dropbox.com/1/oauth2/token": content-type was "text/javascript", expected "application/json".

Response is {"access_token": "TOKEN", "token_type": "bearer", "uid": "UID"}

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


cc @nex3.
Added Area-Pkg, Pkg-OAuth, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


It's frustrating that Dropbox doesn't follow the spec, but I suppose there's no benefit to being persnickety about it in the client.

@DartBot DartBot added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Fixed by dart-lang/sdk@a5cc4f6.


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Removed Pkg-OAuth label.
Added Pkg-OAuth2 label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:oauth2 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants