Skip to content

Commit

Permalink
fix issue #571
Browse files Browse the repository at this point in the history
  • Loading branch information
oyeaussie committed Sep 2, 2024
1 parent 0ea5ba0 commit 2d6be2c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ protected function initOtp($secret, $verify = false)
}

if ($this->core->core['settings']['security']['twofaSettings']['twofaOtp'] === 'totp') {
$this->otp = TOTP::create($secret);
$clock = new \Carbon\FactoryImmutable;
$this->otp = TOTP::createFromSecret($secret, $clock);
} else if ($this->core->core['settings']['security']['twofaSettings']['twofaOtp'] === 'hotp') {
$this->otp = HOTP::create($secret);
}
Expand Down

0 comments on commit 2d6be2c

Please sign in to comment.