yubrajpokharel / socialauth

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

Issue with Google authentication ... #298

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi I was trying to authenticate user using google credentials. I am receiving 
the response . 
When I am calling :
AuthProvider provider = manager.connect(paramsMap); 
Code is throwing below exception : 
org.brickred.socialauth.exception.SocialAuthException: Key in Request Token is 
null or blank
Also when I am receiving response from google, consol is displaying exception 
for below properties: 
openid.ns.ext1
openid.op_endpoint
op_endpoint
response_nonce
return_to
sig
signed
===================================
Modified response is 

{
    openid.op_endpoint=https: //www.google.com/accounts/o8/ud,
    openid.signed=op_endpoint,
    claimed_id,
    identity,
    return_to,
    response_nonce,
    assoc_handle,
    ns.ext1,
    ext1.mode,
    ext1.type.firstname,
    ext1.value.firstname,
    ext1.type.lastname,
    ext1.value.lastname,
    ext1.type.language,
    ext1.value.language,
    ext1.type.email,
    ext1.value.email,
    openid.ns.ext1=http: //openid.net/srv/ax/1.0,
    openid.sig=XYZZZZZZZZZZZZZZZ,
    openid.response_nonce=2013-09-17T17: 37:XYYYYYYYYYYYYYYYYYYY,
    openid.claimed_id=https: //www.google.com/accounts/id?id=YYYYYYYYYYYYYYYYYYYYYYYYY,
    openid.ext1.value.lastname=ABC,
    openid.ext1.value.firstname=D,
    openid.assoc_handle=LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL,
    openid.ext1.value.email=myemail@gmail.com,
    openid.ext1.type.language=http: //axschema.org/pref/language,
    openid.ext1.type.lastname=http: //axschema.org/namePerson/last,
    openid.ext1.type.firstname=http: //axschema.org/namePerson/first,
    openid.ns=http: //specs.openid.net/auth/2.0,
    openid.identity=https: //www.google.com/accounts/o8/id?id=YYYYYYYYYYYYYYYYYYYYYYYYY,
    openid.ext1.type.email=http: //axschema.org/contact/email,
    openid.ext1.mode=fetch_response,
    openid.mode=id_res,
    openid.ext1.value.language=en,
    openid.return_to=http: //myip: 8080/socialAuthSuccessAction
}

Please let me know how to resolve this issue , I am using 
socialauth-java-sdk-4.2

OS - window 7 

Original issue reported on code.google.com by yogeshpu...@gmail.com on 17 Sep 2013 at 6:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
If you are registering your application on google, it provides key/secret for 
OAuth2.0, so you'll have to use GooglePlus provider instead of google.

Make entry in oauth_consumer.properties file

googleapis.com.consumer_key = XXXXX
googleapis.com.consumer_secret = XXXXXX

And use googleplus as a provider key.

Regards
Tarun

Original comment by tarun.na...@3pillarglobal.com on 18 Sep 2013 at 1:48

GoogleCodeExporter commented 8 years ago
Thank you Tarun, This is working fine now. 

Regards, 
Yogesh

Original comment by yogeshpu...@gmail.com on 19 Sep 2013 at 6:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Good to know that it is working.

Previously google provider OAuth1.0 key but now google has implemented OAuth2.0 
and if you register your application now, it provides OAuth2.0 keys.

So SocialAuth google provider supports OAuth1.0 and googleplus provider 
supports OAuth2.0.

Original comment by tarun.na...@3pillarglobal.com on 20 Sep 2013 at 11:36

GoogleCodeExporter commented 8 years ago
Having wasted about 4 hours debugging, I would strongly recommend to add in the 
wiki. 

Original comment by https...@gmail.com on 26 Oct 2013 at 1:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Tarun,
can you please tell me a way to add scope directly through some configuration.

I can not see any permission to access contacts when i try google plus 
provider. It gives me an exception 'Get contact list is not implemented for 
GooglePlus'.

When i use google provider with oauth 2 keys it gives me an error 'Key in 
Request Token is null or blank'.

Original comment by rachamal...@gmail.com on 27 Mar 2014 at 4:40