File tree Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ class="relative"
56
56
}
57
57
58
58
const previousInput = this.getInput(index - 1);
59
+
59
60
previousInput.value = '';
60
61
previousInput.focus();
62
+
61
63
this.updateHiddenField();
62
64
},
63
65
handleKeyDown(index, event) {
@@ -77,6 +79,7 @@ class="relative"
77
79
},
78
80
handlePaste(event) {
79
81
event.preventDefault();
82
+
80
83
const pastedText = (event.clipboardData || window.clipboardData).getData('text');
81
84
const numericOnly = pastedText.replace(/[^0-9]/g, '');
82
85
const digitsToFill = Math.min(numericOnly.length, this.totalDigits);
@@ -88,13 +91,14 @@ class="relative"
88
91
});
89
92
90
93
if (numericOnly.length >= this.totalDigits) {
91
- this.updateHiddenField();
94
+ this.updateHiddenField();
92
95
}
93
96
},
94
97
clearAll() {
95
98
this.digitIndices.forEach(index => {
96
99
this.setValue(index, '');
97
100
});
101
+
98
102
this.$refs.code.value = '';
99
103
this.$refs.input1?.focus();
100
104
}
Original file line number Diff line number Diff line change 4
4
<flux:navlist .item :href =" route('settings.profile')" wire:navigate >{{ __ (' Profile' ) } } </flux:navlist .item >
5
5
<flux:navlist .item :href =" route('settings.password')" wire:navigate >{{ __ (' Password' ) } } </flux:navlist .item >
6
6
@if (Laravel \Fortify \Features:: canManageTwoFactorAuthentication () )
7
- <flux:navlist .item :href =" route('two-factor.show')" wire:navigate >{{ __ (' Two-factor Auth' ) } } </flux:navlist .item >
7
+ <flux:navlist .item :href =" route('two-factor.show')" wire:navigate >{{ __ (' Two-Factor Auth' ) } } </flux:navlist .item >
8
8
@endif
9
9
<flux:navlist .item :href =" route('settings.appearance')" wire:navigate >{{ __ (' Appearance' ) } } </flux:navlist .item >
10
10
</flux:navlist >
Original file line number Diff line number Diff line change @@ -5,13 +5,17 @@ class="relative w-full h-auto"
5
5
x-cloak
6
6
x-data =" {
7
7
showRecoveryInput: @js ($errors -> has (' recovery_code' ) ),
8
+
8
9
code: '',
9
10
recovery_code: '',
11
+
10
12
toggleInput() {
11
13
this.showRecoveryInput = !this.showRecoveryInput;
12
14
this.code = '';
13
15
this.recovery_code = '';
16
+
14
17
$dispatch('clear-2fa-auth-code');
18
+
15
19
$nextTick(() => {
16
20
this.showRecoveryInput
17
21
? this.$refs.recovery_code?.focus()
Original file line number Diff line number Diff line change @@ -50,17 +50,6 @@ public function test_users_can_not_authenticate_with_invalid_password(): void
50
50
$ this ->assertGuest ();
51
51
}
52
52
53
- public function test_users_can_logout (): void
54
- {
55
- $ user = User::factory ()->create ();
56
-
57
- $ response = $ this ->actingAs ($ user )->post ('/logout ' );
58
-
59
- $ response ->assertRedirect ('/ ' );
60
-
61
- $ this ->assertGuest ();
62
- }
63
-
64
53
public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_challenge (): void
65
54
{
66
55
if (! Features::canManageTwoFactorAuthentication ()) {
@@ -89,4 +78,15 @@ public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_
89
78
$ response ->assertSessionHas ('login.id ' , $ user ->id );
90
79
$ this ->assertGuest ();
91
80
}
81
+
82
+ public function test_users_can_logout (): void
83
+ {
84
+ $ user = User::factory ()->create ();
85
+
86
+ $ response = $ this ->actingAs ($ user )->post ('/logout ' );
87
+
88
+ $ response ->assertRedirect ('/ ' );
89
+
90
+ $ this ->assertGuest ();
91
+ }
92
92
}
You can’t perform that action at this time.
0 commit comments