1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Revert "chore: cleanup"

This reverts commit 9182e8f6a3.
This commit is contained in:
loks0n 2024-05-13 14:07:25 +01:00
parent 9182e8f6a3
commit 2c271ca4a1

View file

@ -1291,7 +1291,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
throw new Exception(Exception::USER_UNAUTHORIZED, 'OAuth provider failed to return email.');
}
$isEmailVerified = $oauth2->isEmailVerified($accessToken);
$isVerified = $oauth2->isEmailVerified($accessToken);
$userWithEmail = $dbForProject->findOne('users', [
Query::equal('email', [$email]),
@ -1341,8 +1341,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
Permission::delete(Role::user($userId)),
],
'email' => $email,
'emailVerification' => $isEmailVerified,
'status' => true,
'emailVerification' => $isVerified,
'status' => true, // Email should already be authenticated by OAuth2 provider
'password' => null,
'hash' => Auth::DEFAULT_ALGO,
'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS,