Add even more data to auth_more
We need to know the instance of the token to revoke it
This commit is contained in:
parent
adff3cc36f
commit
349ee5fa42
|
@ -55,7 +55,7 @@ else
|
||||||
$cookie = hash_hmac('sha256', $auth->access_token.$id_user, 'session');
|
$cookie = hash_hmac('sha256', $auth->access_token.$id_user, 'session');
|
||||||
$sm = $db->prepare('INSERT INTO oauth_tokens (id_user, cookie, access_token, auth_more) VALUES (?, ?, ?, ?)');
|
$sm = $db->prepare('INSERT INTO oauth_tokens (id_user, cookie, access_token, auth_more) VALUES (?, ?, ?, ?)');
|
||||||
try {
|
try {
|
||||||
$sm->execute([$id_user, $cookie, $auth->access_token, json_encode($payload->result)]);
|
$sm->execute([$id_user, $cookie, $auth->access_token, json_encode($payload)]);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
# TODO: log error
|
# TODO: log error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue