vishal43it / socialauth

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

Key in Request Token is null or blank causing a NullPointerException (Spring MVC flavour) #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Deploy spring MVC example
2.
3.

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

Caused by: org.brickred.socialauth.exception.SocialAuthException: Key in 
Request Token is null or blank
    at org.brickred.socialauth.util.OAuthConsumer.getAccessToken(OAuthConsumer.java:211)
    at org.brickred.socialauth.provider.GoogleImpl.doVerifyResponse(GoogleImpl.java:220)
    ... 42 more
Jun 1, 2012 10:45:11 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [springsocialauthdemo] in context with 
path [/socialauth-spring-demo] threw exception [Request processing failed; 
nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
    at org.brickred.controller.SuccessController.getRedirectURL(SuccessController.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

Please provide any additional information below.

These were the changes I have done:

1. Create my oauth keys (Only Testing Google Provider):
Target URL path prefix:: http://dev.betterinvite.com/socialauth-spring-demo
OAuth Consumer Key: betterinvite.com
OAuth Consumer Secret: (My Oauth Consumer Secret)

2. 'Modified the following lines in the properties.xml':

properties.xml
-------------   
<util:properties id="socialAuthProperties">
    <prop key="www.google.com.consumer_key">betterinvite.com</prop>
    <prop key="www.google.com.consumer_secret">(My Oauth Consumer Secret)</prop>

3. Modified the following lines in the root-context.xml

root-context.xml
----------------------
    <bean id="socialAuthWebController" class="org.brickred.socialauth.spring.controller.SocialAuthWebController">
        <constructor-arg value="http://dev.betterinvite.com/socialauth-spring-demo" />
        <constructor-arg value="authSuccess.do" />
        <constructor-arg value="jsp/accessDenied.jsp" />
    </bean>

4. Changes in tomcat:

    - Traffic sent to the 80 port is forwared to port 8080 (tomcat).
    - Tomcat server name modified to 'dev.betterinvite.com' (via hosts file and server.xml file).

Thanks for your consideration

Original issue reported on code.google.com by jte...@gmail.com on 1 Jun 2012 at 12:57

GoogleCodeExporter commented 9 years ago
Hi

Please have a look into the following URL
http://code.google.com/p/socialauth/issues/detail?id=138

Can you please confirm the "Comment 1" on this thread. Is it working in your 
code and you are able to see your domain on the page where google is asking 
permission.

Regards

Original comment by tar...@brickred.com on 5 Jun 2012 at 1:39

GoogleCodeExporter commented 9 years ago
No reply from your side, so hoping it is working for you.

Regards
Tarun

Original comment by tar...@brickred.com on 16 Aug 2012 at 4:59

GoogleCodeExporter commented 9 years ago
i m also facing same issue with gmail
please help me out
thanks

Original comment by senkes...@gmail.com on 15 Feb 2013 at 8:03

GoogleCodeExporter commented 9 years ago
I found that by going into this page 
https://accounts.google.com/issuedauthsubtokens and revoking app and then 
trying again did work for me. Not sure why!

Original comment by karunadh...@gmail.com on 24 Sep 2014 at 2:45