From 498ef650759022148c286dfb77d9c1de4126369b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 13 May 2024 14:07:35 +0100 Subject: [PATCH] Revert "fix: use isverified" This reverts commit a347517c168eed7631554578e01b0ae36ff09839. --- app/controllers/api/account.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index b60ce6a04f..8c0f25be09 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1291,6 +1291,9 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') throw new Exception(Exception::USER_UNAUTHORIZED, 'OAuth provider failed to return email.'); } + /** + * Is verified is not used yet, since we don't know after an account is created anymore if it was verified or not. + */ $isVerified = $oauth2->isEmailVerified($accessToken); $userWithEmail = $dbForProject->findOne('users', [ @@ -1341,7 +1344,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') Permission::delete(Role::user($userId)), ], 'email' => $email, - 'emailVerification' => $isVerified, + 'emailVerification' => true, 'status' => true, // Email should already be authenticated by OAuth2 provider 'password' => null, 'hash' => Auth::DEFAULT_ALGO,