Export to GitHub

gwt-oauth2 - issue #5

URL Encoding issue


Posted on Jun 15, 2011 by Grumpy Monkey

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.

Comment #1

Posted on Jun 16, 2011 by Swift Hippo

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.

Comment #2

Posted on Jun 16, 2011 by Grumpy Monkey

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

Comment #3

Posted on Jun 29, 2011 by Helpful Giraffe

Fixed in r30

Status: Fixed

Labels:
Type-Defect Priority-Medium