Support » Plugins » external authentication single sign-on

  • hey, hopefully someone can give me some insight. i have an external authentication service that will be used instead of wordpress. i am basically using the following code snippet:

    wp_set_current_user($user->ID, $user->user_login);
    do_action('wp_login', $user->user_login);

    it works, but only if i’ve logged into wordpress at least once. so for example, if i log into wordpress the usual way, logout, and then authenticate through my external service and then try navigating to wordpress, it will automatically log me in and redirect me to the wordpress admin page.

    ideally i would like to have the user automatically redirected to the wordpress admin page if the user is logged into the external service. otherwise, then show the wordpress login page.

    it sounds cookie-related. thoughts anyone?

    thanks. cheers!

  • The topic ‘external authentication single sign-on’ is closed to new replies.