ttt43ttt / gwt-oauth2

Automatically exported from code.google.com/p/gwt-oauth2
Apache License 2.0
0 stars 0 forks source link

URL Encoding issue #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use scope https://www.googleapis.com/auth/userinfo#email to retrieve user 
email account
2. URL component delimiter # character in this scope is not encoded by 
URL.encode and cause whatever after # to be discarded

What is the expected output? What do you see instead?
error: invalid_request: Missing required parameter: redirect_uri 

Please provide any additional information below.

URL.encodeQueryString may fix issue. 

Original issue reported on code.google.com by vnba...@gmail.com on 15 Jun 2011 at 10:50

GoogleCodeExporter commented 8 years ago
So, what is that scope URL? Are you sure that's an OAuth 2.0 scope?

Secondly, you're right, this should work with that string, if it is an OAuth 
2.0 scope. The spec doesn't specify valid/invalid characters in a scope, so 
we'll have to assume anything can work.

Currently the necessary URL encoding is done with URL.encode/decode, it sounds 
like it needs to be encodeQueryString/decodeQueryString as you suggest.

I'll submit a fix soon and potentially cut a new release this week.

Original comment by imjas...@gmail.com on 16 Jun 2011 at 12:59

GoogleCodeExporter commented 8 years ago
The scope and description can be found at 
http://sites.google.com/site/oauthgoog/Home/emaildisplayscope 

It's a scope to get logged in user's email. Not sure how to find out if it is a 
oauth 2.0 scope

Original comment by vnba...@gmail.com on 16 Jun 2011 at 3:43

GoogleCodeExporter commented 8 years ago
Fixed in r30

Original comment by jasonhall@google.com on 29 Jun 2011 at 7:20