moraskiod / socialauth

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

Key in Request Token is null or blank localhost gcal #328

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run local host / server
2. Set custom permission to 
www.google.com.custom_permissions=https://www.googleapis.com/auth/calendar
3. Try to get user token

What is the expected output? What do you see instead?
Expect to pass successfully through the OauthConsumer class,but fail on line 
230:

if (reqToken.getKey() == null || reqToken.getKey().length() == 0) {
            throw new SocialAuthException(
                    "Key in Request Token is null or blank");
        }

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

Latest, tested on windows 8 and heroku.

Please provide any additional information below.
Tried this from local host, without custom permissions and from heroku deploy 
and getting the same problem.

NB Works fine with facebook login. 

14-Feb-2014 17:51:39.652 INFO [http-apr-8080-exec-3] 
org.brickred.socialauth.provider.GoogleImpl.getLoginRedirectURL Redirection to 
following URL should happen : 
https://www.google.com/accounts/o8/ud?openid.assoc_handle=1.AMlYA9Xj7u8u5E5iTjKg
TTKFc-X21SfCi6RFtuXVdqgn6y-140HeLwH-RTDAsA&openid.ax.mode=fetch_request&openid.a
x.required=country%2Cemail%2Cfirstname%2Clanguage%2Clastname&openid.ax.type.coun
try=http%3A%2F%2Faxschema.org%2Fcontact%2Fcountry%2Fhome&openid.ax.type.email=ht
tp%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ax.type.firstname=http%3A%2F%2F
axschema.org%2FnamePerson%2Ffirst&openid.ax.type.language=http%3A%2F%2Faxschema.
org%2Fpref%2Flanguage&openid.ax.type.lastname=http%3A%2F%2Faxschema.org%2FnamePe
rson%2Flast&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fident
ifier_select&openid.ext2.consumer=localhost&openid.ext2.scope=https%3A%2F%2Fwww.
googleapis.com%2Fauth%2Fcalendar&openid.identity=http%3A%2F%2Fspecs.openid.net%2
Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.ax=http%3A%2
F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ns.ext2=http%3A%2F%2Fspecs.openid.net%2Fe
xtensions%2Foauth%2F1.0&openid.ns.max_auth_age=0&openid.ns.pape=http%3A%2F%2Fspe
cs.openid.net%2Fextensions%2Fpape%2F1.0&openid.ns=http%3A%2F%2Fspecs.openid.net%
2Fauth%2F2.0&openid.realm=http%3A%2F%2Flocalhost%3A8080&openid.return_to=http%3A
%2F%2Flocalhost%3A8080%2Fsocialauth
14-Feb-2014 17:51:42.946 INFO [http-apr-8080-exec-4] 
org.brickred.socialauth.SocialAuthManager.connect Connecting provider : google
14-Feb-2014 17:51:44.356 INFO [http-apr-8080-exec-4] 
org.brickred.socialauth.provider.GoogleImpl.doVerifyResponse Verifying the 
authentication response from provider
org.brickred.socialauth.exception.SocialAuthException: Key in Request Token is 
null or blank
    at org.brickred.socialauth.util.OAuthConsumer.getAccessToken(OAuthConsumer.java:231)
    at org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:138)
    at org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:115)
    at org.brickred.socialauth.provider.GoogleImpl.doVerifyResponse(GoogleImpl.java:178)
    at org.brickred.socialauth.provider.GoogleImpl.verifyResponse(GoogleImpl.java:167)
    at org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:184)
    at org.brickred.socialauth.SocialAuthManager$$FastClassByCGLIB$$1e842cf3.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:713)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:646)
    at org.brickred.socialauth.SocialAuthManager$$EnhancerByCGLIB$$e7743e15.connect(<generated>)
    at org.brickred.socialauth.spring.controller.SocialAuthWebController.callback(SocialAuthWebController.java:145)
    at org.brickred.socialauth.spring.controller.SocialAuthWebController.openidCallback(SocialAuthWebController.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:822)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:651)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2451)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2440)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Original issue reported on code.google.com by boarder.kite@gmail.com on 14 Feb 2014 at 5:54

GoogleCodeExporter commented 8 years ago
Please find the source code here:

https://github.com/StevenCurran/planit-dev

Original comment by boarder.kite@gmail.com on 14 Feb 2014 at 6:19

GoogleCodeExporter commented 8 years ago
First of all if you have registered your application recently on google then it 
provides key for OAuth2.0 which is supported by GooglePlus provider.
We have not checked calender functionality with google plus.

Secondly, except for profile you can not make any other request from localhost 
on google. You'll have to use the same domain which you are using to register 
your application. 

Original comment by tarun.na...@3pillarglobal.com on 18 Feb 2014 at 4:33

GoogleCodeExporter commented 8 years ago
Closing this issue. Please open new one if you are still facing the issue.

Original comment by tarun.na...@3pillarglobal.com on 4 Apr 2014 at 12:58