Skip to content

Commit 9bb6403

Browse files
committed
fix: mark email verified for already existent users on OTP flow
Change-Id: I9ecee4291a1043c4a4f848f254119b17d30bf4a3
1 parent 8a679e9 commit 9bb6403

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/libs/Auth/AuthService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ public function loginWithOTP(OAuth2OTP $otpClaim, ?Client $client = null, bool $
254254
$otp
255255
);
256256
}
257+
else{
258+
// verify email
259+
$user->verifyEmail(false);
260+
}
257261

258262
if(!$user->canLogin()){
259263
Log::warning(sprintf("AuthService::loginWithOTP user %s cannot login ( is not active ).", $user->getId()));

0 commit comments

Comments
 (0)