mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-26 15:01:54 +02:00
Fix pint issues
This commit is contained in:
parent
ad43aa777b
commit
e624995ebc
@ -131,8 +131,7 @@ class GroupController extends Controller
|
||||
// are not assigned to any group record.
|
||||
if ($group->id === 0) {
|
||||
$twofaccounts = $request->user()->twofaccounts;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$twofaccounts = $group->twofaccounts;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class SinglePageController extends Controller
|
||||
$publicSettings = $appSettings->only([
|
||||
'disableRegistration',
|
||||
'enableSso',
|
||||
'useSsoOnly'
|
||||
'useSsoOnly',
|
||||
]);
|
||||
$settings = $appSettings->map(function (mixed $item, string $key) {
|
||||
return null;
|
||||
|
@ -117,8 +117,7 @@ class Group extends Model
|
||||
$group->id = 0;
|
||||
|
||||
return $group;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return parent::resolveRouteBinding($value, $field);
|
||||
}
|
||||
}
|
||||
|
@ -431,12 +431,10 @@ class TwoFAccount extends Model implements Sortable
|
||||
$OtpDto->otp_type = $this->otp_type;
|
||||
$OtpDto->generated_at = $time ?: time();
|
||||
$expires_in = $this->generator->expiresIn(); /** @phpstan-ignore-line - expiresIn() is in the TOTPInterface only */
|
||||
|
||||
if ($this->otp_type === self::TOTP) {
|
||||
$OtpDto->password = $this->generator->at($OtpDto->generated_at);
|
||||
$OtpDto->next_password = $this->generator->at($OtpDto->generated_at + $expires_in + 2);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$OtpDto->password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)));
|
||||
$OtpDto->next_password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)), $expires_in + 2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user