mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Mark email verified after email OTP
This commit is contained in:
@@ -123,7 +123,8 @@ $createSession = function (string $userId, string $secret, Request $request, Res
|
||||
Authorization::skip(fn () => $dbForProject->deleteDocument('tokens', $verifiedToken->getId()));
|
||||
$dbForProject->purgeCachedDocument('users', $user->getId());
|
||||
|
||||
if ($verifiedToken->getAttribute('type') === Auth::TOKEN_TYPE_MAGIC_URL) {
|
||||
// Magic URL + Email OTP
|
||||
if ($verifiedToken->getAttribute('type') === Auth::TOKEN_TYPE_MAGIC_URL || $verifiedToken->getAttribute('type') === Auth::TOKEN_TYPE_EMAIL) {
|
||||
$user->setAttribute('emailVerification', true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user