retrieving user password to manage the Wordpress Session for login.

My coder is running into a problem retrieving user password to manage the Wordpress Session for login.

He says...
I can get this data but here i don't have password...so i can't manage WP login

https://www.dropbox.com/s/7rllykmscxa10h0/image (1).png?dl=0

I tried above thing as well and last screenshot of that response only

so problem is that to login wordpress i need password or if we can surpass wp login with user email id and fb token

Our login from wp-login works, but not if we try to register user from our checkout window. Add 1 product to cart, and press checkout on this page remysreef.exoticreefimports.com to see the login buttons we are having trouble with.

Best Answer

  • Hi Remy,

    our API will return you a user_token, you can use that token to login the user:

    $user_id = oa_social_login_get_userid_by_token ($user_token);
    $user_data = get_userdata ($user_id);
    if ($user_data !== false)
    {
    wp_clear_auth_cookie ();
    wp_set_auth_cookie ($user_data->ID, true);
    do_action ('wp_login', $user_data->user_login, $user_data);
    }
    If the $user_id from the first call is empty, then there is no such user yet.
    With our plugin you should however not have to do this on your own.

    The plugin already registers/logs users in automatically.
Sign In or Register to comment.