2

I'm using bshaffer OAuth 2.0 PHP Server. I want to create a token with user_id. How can I achive this?

I don't know if I have to make it after the handleTokenRequest() or before? Within one response or in a separate api request?

My token provider:

    $userid = 1234;
    $request = OAuth2\Request::createFromGlobals();
    $response = new OAuth2\Response();
    $OAuth2Server->handleAuthorizeRequest($request, $response, true, $userid);
    $OAuth2Server->handleTokenRequest($request, $response);
    $response->send();

What am I missing to store the userid to the oauth_access_tokens table?

LuiKang
  • 83
  • 1
  • 7

0 Answers0