BluesZhang / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

GDataOAuthViewControllerTouch : Unable to login to YouTube using YouTube username #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. In OAuthSampleRootViewControllerTouch , set the scope to YouTube : 

 NSString *scope = @"https://gdata.youtube.com";

or 

  NSString *scope = [[GDataServiceGoogleYouTube class] authorizationScope];

2. Attempt to login. 
3. The page shown will be the standard Google login page, not the YouTube or 
Google login page (see attached for a screen shot of expected output).

Looks like GDataOAuthSignIn.initWithAuthentication sets the 
shouldFetchGoogleUserInfo_ to YES, which triggers 
https://www.googleapis.com/auth/userinfo#email scope to be added to the scope 
list. When scope contains https://www.googleapis.com/auth/userinfo#email , the 
user is no longer able to login using the YouTube account - attempts to 
authenticate the request token for the extended scope using YouTube account 
only does not work (which may make sense considering that no Google account 
info is provided by the user). 

It would be good if GDataOAuthWindowController allowed for disabling the 
shouldFetchGoogleUserInfo flag.

What is the expected output? What do you see instead?

See the attached screen shot for the expected output and actual output. 

What version of the product are you using? On what operating system?

iOS4, trunk as of revision 541. 

Please provide any additional information below.

Original issue reported on code.google.com by jar...@google.com on 25 Aug 2010 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
It does GDataOAuthSignIn has:

  @property (nonatomic, assign) BOOL shouldFetchGoogleUserInfo;

So after one is created, just send -setShouldFetchGoogleUserInfo: with NO to 
the instance.

Original comment by thoma...@gmail.com on 25 Aug 2010 at 2:16

GoogleCodeExporter commented 9 years ago
Yes, I saw this but I did not see a way to retrieve the private instance of 
GDataOAuthSignIn from GDataOAuthWindowController, or am I missing something ? 

Original comment by jar...@google.com on 25 Aug 2010 at 5:20

GoogleCodeExporter commented 9 years ago
Fundamentally, this is a YouTube issue; they should support the userinfo scope 
string and endpoint.

Original comment by gregrobbins on 25 Aug 2010 at 7:47

GoogleCodeExporter commented 9 years ago
internal bug b/2949566

Original comment by gregrobbins on 25 Aug 2010 at 8:15

GoogleCodeExporter commented 9 years ago
I've checked into the top-of-trunk a property in the view/window controller to 
get the signIn object

http://code.google.com/p/gdata-objectivec-client/source/detail?r=553

Original comment by gregrobbins on 25 Aug 2010 at 10:08

GoogleCodeExporter commented 9 years ago
Great - thanks Greg!
Jarek

Original comment by jar...@google.com on 25 Aug 2010 at 10:13

GoogleCodeExporter commented 9 years ago

Original comment by gregrobbins on 10 Sep 2010 at 12:45