• Is there a way to generate token and refresh token without user credentials?

    I’m trying to implement a custom login method and I need to generate token and refresh token using user ID.

    thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author dominic_ks

    (@dominic_ks)

    Yes, you can do something like this:

    $user = get_user_by( 'ID' , $user_id );
    $auth = new \JWTAuth\Auth;
    $token = $auth->generate_token( $user );
    • This reply was modified 7 months, 3 weeks ago by dominic_ks.
    • This reply was modified 7 months, 3 weeks ago by dominic_ks.
Viewing 1 replies (of 1 total)
  • The topic ‘Generate token and refresh token using user ID’ is closed to new replies.