Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring-Social Sign-In without Sign-up

I have recently started using Spring-Social.

In all the samples I am looking at there is the process of sign-in by clicking the image of "Connect with Facebook" and then being redirected to a page where you need to sign-up to the actual website you visit.

Stack-Overflow is the perfect example where there is no registration, you simply click a button and you are logged in into your account and can start asking question. If you wish to log-out and connect via different provider you can do it and stack overflow will recognize you (assuming the email address is the unique identifier).

My question is, why do you actually need the sign-up feature?

like image 231
user1782427 Avatar asked Jan 05 '13 21:01

user1782427


2 Answers

The Spring Social Quickstart sample at https://github.com/SpringSource/spring-social-samples/tree/master/spring-social-quickstart is an example of an application that has an implicit signup. There is no registration page and instead the user's Facebook profile data is used to create a user. (This is actually handled the application-defined SimpleConnectionSignUp, which is injected into JdbcUsersConnectionRepository.)

The Spring Social Canvas sample is another one that does this, albeit for a Facebook Canvas application.

There are a number of ways this could play out for the user, but most/all of them can be addressed with an appropriate implementation of the ConnectionSignUp interface.

like image 112
Craig Walls Avatar answered Sep 23 '22 17:09

Craig Walls


Actually when doing sign-in with spring social you do not use a session from some provider (Facebook for example). Spring Social will try to match your social account with some local application account. If it find the match then a local session in your application will be created. So you will have more control over a session / user profile:

  • you will be able to do logout only for you web application
  • you will be able to disable some account only for you application
like image 24
Maksym Demidas Avatar answered Sep 22 '22 17:09

Maksym Demidas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!