Skip to content

Commit 2422dbf

Browse files
committed
Merge branch 'main' of github.com:stephenjude/filament-two-factor-authentication
2 parents 07a6f64 + f6c9f2d commit 2422dbf

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to `filament-two-factor-authentication` will be documented in this file.
44

5+
## 3.0.3 - 2025-08-17
6+
7+
### What's Changed
8+
9+
* Add constructor property promotion support for events by @stephenjude in https://github.com/stephenjude/filament-two-factor-authentication/pull/78
10+
* Improvements: Switch 2FA challenge from hash validation to decrypt validation and Cleanup translation usage. by @stephenjude in https://github.com/stephenjude/filament-two-factor-authentication/pull/79
11+
12+
**Full Changelog**: https://github.com/stephenjude/filament-two-factor-authentication/compare/3.0.2...3.0.3
13+
514
## 3.0.2 - 2025-08-17
615

716
### What's Changed

resources/lang/en/actions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
return [
34
'confirm_two_factor_authentication' => [
45
'wrong_code' => 'The provided two factor authentication code was invalid.',

src/Pages/Challenge.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class Challenge extends BaseSimplePage
1919

2020
public ?array $data = [];
2121

22-
public function getTitle(): string|Htmlable
22+
public function getTitle(): string | Htmlable
2323
{
2424
return __('filament-two-factor-authentication::section.header');
2525
}
2626

2727
public function mount(): void
2828
{
29-
if (!Filament::auth()->check()) {
29+
if (! Filament::auth()->check()) {
3030
redirect()->to(filament()->getCurrentOrDefaultPanel()?->getLoginUrl());
3131

3232
return;
@@ -81,7 +81,7 @@ public function form(Schema $schema): Schema
8181
->required()
8282
->autocomplete()
8383
->rules([
84-
fn() => function (string $attribute, $value, $fail) {
84+
fn () => function (string $attribute, $value, $fail) {
8585
$user = Filament::auth()->user();
8686
if (is_null($user)) {
8787
$fail(__('filament-two-factor-authentication::pages.challenge.error'));
@@ -96,7 +96,7 @@ public function form(Schema $schema): Schema
9696
code: $value
9797
);
9898

99-
if (!$isValidCode) {
99+
if (! $isValidCode) {
100100
$fail(__('filament-two-factor-authentication::pages.challenge.error'));
101101

102102
event(new TwoFactorAuthenticationFailed($user));

src/TwoFactorAuthenticatable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ trait TwoFactorAuthenticatable
2121
*/
2222
public function hasEnabledTwoFactorAuthentication(): bool
2323
{
24-
return !is_null($this->two_factor_secret) &&
25-
!is_null($this->two_factor_confirmed_at);
24+
return ! is_null($this->two_factor_secret) &&
25+
! is_null($this->two_factor_confirmed_at);
2626
}
2727

2828
public function hasEnabledPasskeyAuthentication(): bool

0 commit comments

Comments
 (0)