1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

fix: email factor for otp

This commit is contained in:
Torsten Dittmann 2024-01-24 17:50:16 +01:00
parent 9070dce6ac
commit b6d85b5a24

View file

@ -1474,7 +1474,9 @@ $createSession = function (string $userId, string $secret, Request $request, Res
$sessionSecret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_SESSION);
$factor = match ($verifiedToken->getAttribute('type')) {
Auth::TOKEN_TYPE_MAGIC_URL, Auth::TOKEN_TYPE_OAUTH2 => 'email',
Auth::TOKEN_TYPE_MAGIC_URL,
Auth::TOKEN_TYPE_OAUTH2,
Auth::TOKEN_TYPE_EMAIL => 'email',
Auth::TOKEN_TYPE_PHONE => 'phone',
Auth::TOKEN_TYPE_GENERIC => 'token',
default => throw new Exception(Exception::USER_INVALID_TOKEN)