Monday, 15 February 2010

Spring Social, Create connection for existing local users on signin -


I allow existing local users to sign in to use Spring Social, primarily google, and For email matches, a new user connection has been found to have a local user account

I have only found an example for intensive signup (for example, creating / creating a new account), new user signup SpringSocial fails for The default action) and the connect option to the current user.

How can I expand the springsings to check existing social users / local user email matches, can I create user connections from existing local users and then enter them both as local and social?

Instead of creating a new you can use the signed sign up to find the account.

Modified for the code, you can do something similar to the following:

  Public Class AccountConnected Signup Tools Connection Sign Up {Private Final Account Registrar Account Resository; Public AccountCountry Signup (Account Registrar Account Reprise) {this.accountRepository = accountRepository; } Executed public string (connection  connection; l & gt; connection) {UserProfile profile = connection.fetchUserProfile (); Account Account = Account Resository. Fund AccountBeEmail (profile.fmail ()); Return account == tap? Blank: account.getUsername (); }}  

You will need to implement account and AccountRepository to support an email property, then e-mail Use the repository to find an account by If the repository can not get an account, then empty the vacant space.


No comments:

Post a Comment