I'm using Play Framework 2.1 with SecureSocial.
I have my own templates, UserService, and UsernamePasswordProvider/FacebookProvider.
I dont use SecureSocial to register my users, but I use it to login and handle sessions. How can I make people be logged in after registration, so in my Java code ?
I tried to use Authenticator.create(...)
securesocial.core.Authenticator.create(Scala.orNull(securesocial.core.UserService.find(new securesocial.core.UserId(newUser.getId(),"wimhauserpass"))));
but I cant use UserService.find()
, it tells me it must be static ...
I'm gonna implement another Provider dedicated to retrieve credentials from the RegisterForm, and call
securesocial.controllers.ProviderController.authenticate("userpassregister");
Any better idea ?
Thanks
If I understood you correctly you have a custom signup controller and after successful signup the user shall be logged in.
We also had this case in a play2 java app with securesocial, and our CustomRegistrationController.handleSignUp method looks s.th. like this:
I hope this answers your question.