oauth2-server-php icon indicating copy to clipboard operation
oauth2-server-php copied to clipboard

Authorization Storage Issue

Open JavedBoqo opened this issue 6 years ago • 3 comments

Hi, An authorization code is not being store in oauth_authorization_codes table in db while I am getting authorization code in $response object. In authorize.php page when I comment the line

$response->send();

then authorization code is storing in database. Am I missing something here? Below is my authorization testing URL http://localhost/my-code/authorize.php?response_type=code&client_id=1&state=100&user_id=100

JavedBoqo avatar Feb 23 '19 07:02 JavedBoqo

I'm using the token but cannot store the user_id to token also. Can someone please help us how to?

I got one api call to send back a new token. Should I insert the handleAuthorizeRequest(OAuth2\Request::createFromGlobals(), $response, true, $userid); also? Or in a separate next request?

$token = $OAuth2Server->getAccessTokenData($request); is alway returning null to me and ofc the user_id is not in the database (oauth_access_tokens table).

bodnarlajostibor avatar Jul 07 '19 21:07 bodnarlajostibor

i have save to db trouble too,Authorization code not save to db

yuranikspb avatar Feb 05 '20 11:02 yuranikspb

Auth codes are deleted once you trade it for an access token

adisazhar123 avatar May 16 '20 14:05 adisazhar123