From 349ee5fa42e5f46dd5b9f81d17625d3991f1baa6 Mon Sep 17 00:00:00 2001 From: Bastard Operator Date: Sat, 27 Nov 2021 02:47:51 +0100 Subject: [PATCH] Add even more data to auth_more We need to know the instance of the token to revoke it --- src/action/oauth/mastodon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action/oauth/mastodon.php b/src/action/oauth/mastodon.php index ca20c33..d1fff55 100644 --- a/src/action/oauth/mastodon.php +++ b/src/action/oauth/mastodon.php @@ -55,7 +55,7 @@ else $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 (?, ?, ?, ?)'); 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) { # TODO: log error }