mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-15 21:03:45 +02:00
Add base logic to configure two factor on account
This commit is contained in:
@@ -65,7 +65,9 @@ class ToggleTwoFactorService
|
||||
$isValidToken = $this->google2FA->verifyKey($secret, $token, config()->get('pterodactyl.auth.2fa.window'));
|
||||
|
||||
if (! $isValidToken) {
|
||||
throw new TwoFactorAuthenticationTokenInvalid;
|
||||
throw new TwoFactorAuthenticationTokenInvalid(
|
||||
'The token provided is not valid.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->repository->withoutFreshModel()->update($user->id, [
|
||||
|
||||
Reference in New Issue
Block a user