Support » Plugin: Simple Single Sign On » Single Sign On Failed

  • I’m getting the following error:

    Single Sign On Failed. User mismatch or clash with existing data and SSO can not complete.

    I have new accounts can be created. What have I missed?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lordmatt

    (@lordmatt)

    I changed:

    		if ( is_user_logged_in() ) {
    			wp_safe_redirect( $user_redirect );
    			exit;
    		}

    to

    		if ( is_user_logged_in() ) {
    			wp_safe_redirect( $user_redirect );
    			exit;
    		}else{
    			exit( exit( $user_info->error.' : '.$user_info->error_description ); );
    		}

    and got

    invalid_request : Invalid token

    Inspecting wp_set_current_user() I found it returned a WP_Error with ” Cannot create a user with an empty login name.” Which is to be expected. It should probably check for an OAuth error before trying to make a user.

    • This reply was modified 2 months, 1 week ago by lordmatt.
    • This reply was modified 2 months, 1 week ago by lordmatt.
    • This reply was modified 2 months, 1 week ago by lordmatt. Reason: WP_Error
    • This reply was modified 2 months, 1 week ago by lordmatt.
    Thread Starter lordmatt

    (@lordmatt)

    I’ve been through “WP OAuth Server” with all the searches I could think of. I have no idea what is going wrong.

    Thread Starter lordmatt

    (@lordmatt)

    From dumping $response it seems to be sending: https://[snip]...[/snip].com/?oauth=me&access_token=

    Thread Starter lordmatt

    (@lordmatt)

    I have tracked this down to a 502 Bad Gateway fully formatted HTML reply to the call wp_remote_post( $server_url, array(...) );. Which might be a bit of an edge case but might be worth testing for.

    I propose the following change to callback.php:

    	$user_info = json_decode( $response['body'] );
    	
    	if ( isset($user_info->error) ) {
    		exit('Something is wrong: '.$user_info->error.' : '.$user_info->error_description);
    	}
    • This reply was modified 2 months, 1 week ago by lordmatt.
    • This reply was modified 2 months, 1 week ago by lordmatt.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.