From 71aed9dceceb7af81dce7fd31d3b59581d66cfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 9 Apr 2023 02:53:45 +0200 Subject: [PATCH] send all user data with oauth --- src/Controller/OAuthLoginController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Controller/OAuthLoginController.php b/src/Controller/OAuthLoginController.php index 6bee3b0..7a970d4 100644 --- a/src/Controller/OAuthLoginController.php +++ b/src/Controller/OAuthLoginController.php @@ -106,7 +106,12 @@ class OAuthLoginController 'exp' => (int)$token->getExpiresDate()->format('U'), 'nonce' => $token->getNonce(), 'sub' => $user->getId(), - 'email' => $user->getEmail() + 'email' => $user->getEmail(), + 'username' => $user->getUsername(), + 'full_name' => $user->getFullName(), + 'nickname' => $user->getNickname(), + 'phone' => $user->getPhone(), + 'id_number' => $user->getIdNumber() ]; $privateKey = file_get_contents(ROOT . '/' . $_ENV['JWT_RSA_PRIVATE_KEY']); $jwt = JWT::encode($payload, $privateKey, 'RS256');