Login using multiple social network cause creation of “duplicated” accounts
-
Hello,
The problem I have experienced appeared during a test I was making before posting the blog for live.
The problem is mostly related to Facebook login but only when following the below reproduction steps.
1. Have admin account, registered on unique email
2. Have Facebook, Google+ and Twitter registered on same email address (different than admin account)
3. Have Facebook, Google+ and Twitter login configured in WordPress Social Login
4. All profile completion fields are set to ‘NO’ in bouncer settings
5. Account linking is disabled in settings
6. Use following code to fix permission scopes of specified social networksfunction wsl_change_default_permissons( $provider_scope, $provider ) { if( 'facebook' == strtolower( $provider ) ) { $provider_scope = 'email, public_profile'; } if( 'google' == strtolower( $provider ) ) { $provider_scope = 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me profile email'; } return $provider_scope; } add_filter( 'wsl_hook_alter_provider_scope', 'wsl_change_default_permissons', 10, 2 );
7. Login using Twitter or Google+
8. Via Admin account check Dashboard -> Users to see newly created user
9. Logout
10. Login using Facebook
11. Via Admin account check Dashboard -> Users to see newly created user
12. After point 11 you should notice that after logging with Facebook, it will create new account with example email, instead using existing account of same email.NOW,
If you would reverse the scenario, and first login with Facebook, account will be created with proper email, then login with Twitter or Google+ after you will see it will use existing account assigned to the email (if same), instead creating new useless account.
EXPECTED result: When logging via any social network it should check if there is an account registered to email that is used by social network, if yes then use it, instead creating new. Affected scenario has been described in reproduction steps.
In case of questions please do not hesitate to contact me, I really hope for a quick fix.
- The topic ‘Login using multiple social network cause creation of “duplicated” accounts’ is closed to new replies.