Jan 24th, 2013, 01:01 PM
Security context method returns null
I have an iusse wich I can't work out.
I'm using Spring Social and Security to allow user get logged in on my web app.
We offer to an user the possibility to log in using various social networks.
Suppose I log in with twitter. All works.
When I try to log with Facebook (or viceversa) I get always a null object from the getContext() method, even if user is yet logged in!
Why this happens? I'd like to avoid a double/triple entry for an user only because he's logged with another social network.
Thanks in advance,
Jan 25th, 2013, 09:47 AM
I'm confused as the SecurityContextHolder will always return a non-null value for SecurityContextHolder.getContext(). If there isn't a SecurityContext present, it returns an empty one. Are you using a different SecurityContextHolderStrategy?
Tags for this Thread