From 7f1b1aa4d92c5017fa91022a32a34931ca68a7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 8 Apr 2023 19:20:26 +0200 Subject: [PATCH] fixup! RVRNEXT-2 add controller and view for oauth --- src/Controller/OAuthLoginController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Controller/OAuthLoginController.php b/src/Controller/OAuthLoginController.php index c8f36fe..0e3fec5 100644 --- a/src/Controller/OAuthLoginController.php +++ b/src/Controller/OAuthLoginController.php @@ -5,6 +5,7 @@ use Firebase\JWT\JWT; use RVR\PersistentData\Model\OAuthToken; use RVR\Repository\OAuthTokenRepository; use RVR\Repository\UserRepository; +use RVR\PersistentData\Model\User; use SokoWeb\Interfaces\Request\IRequest; use SokoWeb\Interfaces\Response\IContent; use SokoWeb\Interfaces\Response\IRedirect; @@ -55,6 +56,9 @@ class OAuthLoginController $this->request->session()->delete('oauth_state'); + /** + * @var ?User $user + */ $user = $this->request->user(); if ($user === null) { return new HtmlContent('oauth/oauth_error', ['error' => 'You are not logged in. Please start authentication again.']);