1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-10-22 19:36:32 +02:00

Swap order of arguments for 'addSmsOption' and 'addEmailOption'

This commit is contained in:
Marco
2024-08-16 07:02:38 +02:00
parent e5ccc81988
commit ceac62c3f3
2 changed files with 6 additions and 6 deletions

View File

@@ -1321,10 +1321,10 @@ final class Auth extends UserManager {
$otpValue = $this->generateAndStoreRandomOneTimePassword($userId, $twoFactorMethod['mechanism']);
if (((int) $twoFactorMethod['mechanism']) === self::TWO_FACTOR_MECHANISM_SMS) {
$secondFactorRequiredException->addSmsOption($twoFactorMethod['seed'], $otpValue);
$secondFactorRequiredException->addSmsOption($otpValue, $twoFactorMethod['seed']);
}
elseif (((int) $twoFactorMethod['mechanism']) === self::TWO_FACTOR_MECHANISM_EMAIL) {
$secondFactorRequiredException->addEmailOption($twoFactorMethod['seed'], $otpValue);
$secondFactorRequiredException->addEmailOption($otpValue, $twoFactorMethod['seed']);
}
else {
throw new InvalidStateError();