NullPointerException on manager.getCurrentAuthProvider()
Opened this issue · 7 comments
GoogleCodeExporter commented
I am using
Socialauth-Spring (4.3) with Spring 3 MVC + Tomcat
by using https://code.google.com/p/socialauth/wiki/SpringSample
AuthProvider provider = manager.getCurrentAuthProvider();
throwing NullPointerException frequently.
Not sure what I am doing wrong. Any help would be appreciated.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Socialauth-Spring 4.3
Please provide any additional information below.
Original issue reported on code.google.com by girinamb...@gmail.com
on 17 Feb 2014 at 4:46
GoogleCodeExporter commented
How you are getting manager before calling getCurrentAuthProvider().
Please check the spring example bundled in SDK to get manager object.
Original comment by tarun.na...@3pillarglobal.com
on 18 Feb 2014 at 4:27
GoogleCodeExporter commented
Hi Tarun,
Thanks for quick reply! I have followed exactly this code:
http://code.google.com/p/socialauth/source/browse/trunk/socialauthdemo/src/main/
java/com/threepillar/labs/socialauthsample/controller/SuccessController.java
I am getting manager with following statement:
SocialAuthManager manager = socialAuthTemplate.getSocialAuthManager();
And socialAuthTemplate is injected variable:
@Autowired
private SocialAuthTemplate socialAuthTemplate;
And my servlet.xml file has
<bean id="socialAuthTemplate" class="org.brickred.socialauth.spring.bean.SocialAuthTemplate" scope="session">
<aop:scoped-proxy/>
</bean>
I saw few threads with similar issues, but they are with JSF framework.
Any other pointers?
Thanks for your time and help.
Original comment by girinamb...@gmail.com
on 18 Feb 2014 at 4:36
GoogleCodeExporter commented
It seems this issue is related to comment :
Comment by healey.b...@gmail.com, Sep 7, 2012
from following thread:
http://code.google.com/p/socialauth/wiki/GettingStartedWithYourOwnFramework
Any idea how can I implement this with Spring-SocialAuth?
Thanks for your time and help.
Original comment by girinamb...@gmail.com
on 19 Feb 2014 at 3:32
GoogleCodeExporter commented
I just want to add few more supporting points, I have created clone of
SocialAuthWebController.java with few system.out statements.
I have observed that session ids are different when we get control back into
SuccessController.java. Which may be forcing new instance of SocialAuthTemplate
with manager as null.
Here is example:
Session id is before authentication...E7557680F892C6776F36691E9DF93CF5
Success controller session ID.... 726C2EE5C240BDE4D217CBFDB9C47A0F
Any help or input would be appreciated.
Original comment by girinamb...@gmail.com
on 19 Feb 2014 at 3:47
GoogleCodeExporter commented
Hi,
Any suggestions (or) ways I can do my own implementation?
Thank you for your time and help.
Original comment by girinamb...@gmail.com
on 20 Feb 2014 at 7:48
GoogleCodeExporter commented
I am also getting the same problem.
AuthProvider provider = manager.getCurrentAuthProvider();
I am getting provider as null.
Any one can help me.
Thanks in advance.
Original comment by gvs.chi...@gmail.com
on 24 Mar 2014 at 8:56
GoogleCodeExporter commented
I got the same error!
I'm using with spring mvc
:(
Original comment by cio.dan...@gmail.com
on 23 Dec 2014 at 12:18