khairmodeomkar / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

Google Wrapper Token Always NULL #166

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Connect with Google
2.Provide your credentials
3. once authenticated and comes back to owner's website, Token input is null.

What is the expected output? What do you see instead?
It gets authenticated but it does not include token information, fails to 
obtain token from the response.

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

Please provide any additional information below.

Line number : 146

GoogleWrapper.cs

Configured AdditionalScopes="https://www.google.com/m8/feeds/" in web.config.

Please let me know what needs to be there in the google return url and 
additional scope.

  if (!string.IsNullOrEmpty(provider.GetScope()) || provider.IsScopeDefinedAtProvider)
                if (responseCollection.HasName("openid.oauth.request_token"))
                    connectionToken.RequestToken = responseCollection["openid.oauth.request_token"];
                else if (responseCollection.HasName("openid.ext2.request_token"))
                    connectionToken.RequestToken = responseCollection["openid.ext2.request_token"];
                else
                {
                    logger.Error(ErrorMessages.RequestTokenResponseInvalid(responseCollection));
                    throw new OAuthException(ErrorMessages.RequestTokenResponseInvalid(responseCollection));
                }

Thanks

Original issue reported on code.google.com by 2Mitesh....@gmail.com on 18 Feb 2013 at 11:46

Attachments:

GoogleCodeExporter commented 8 years ago
In OAuth1_0Hybrid.DirectUserToServiceProvider():
queryParameters.Add("openid.ns.oauth", 
"http://specs.openid.net/extensions/oauth/1.0");
queryParameters.Add("openid.oauth.consumer", this.provider.Consumerkey);

However, the following Google documentation:
https://developers.google.com/accounts/docs/OpenID

Says this:
openid.ns.ext2: (required) Indicates request for an OAuth token. (..)
openid.ext2.consumer: ..
openid.ext2.scope: ..

So it seems the OAuth token is never actually requested due to faulty request 
parameters.

Original comment by fm0...@gmail.com on 10 Jun 2013 at 2:48

GoogleCodeExporter commented 8 years ago
If you notice there example on same page, they too are using openid.ns.oauth. I 
believe, you've generated keys/secrets for OAuth2.0 while SocialAuth.NET  
currently supports HybridOauth. We haven't faced issue so far.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 12 Jun 2013 at 12:55