• 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 networks

    function 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.

    • This topic was modified 6 years, 5 months ago by zbwziete.
    • This topic was modified 6 years, 5 months ago by zbwziete.
    • This topic was modified 6 years, 5 months ago by zbwziete.
    • This topic was modified 6 years, 5 months ago by zbwziete.
Viewing 1 replies (of 1 total)
  • Thread Starter zbwziete

    (@zbwziete)

    If my description would be not clear enough I just leave shorter description of what actual issue is, above reproduction steps and configuration still applies.

    If you attempt to login with facebook first it will use facebook email.

    If you will login using any other provider, e.g. google or twitter then logout, then use facebook to login, it will create wordpress account using some example email, instead use existing wordpress account that matches facebook email.

    The issue occurs ONLY if you will first login to other provider then facebook. The issue does not happen on other login providers.

Viewing 1 replies (of 1 total)
  • The topic ‘Login using multiple social network cause creation of “duplicated” accounts’ is closed to new replies.