File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,9 @@ class Confirm2Fa extends SimplePage implements HasForms
27
27
28
28
protected static string $ view = 'filament-2fa::livewire.confirm2-fa ' ;
29
29
30
- public static function canView ()
31
- {
32
- return false ;
33
- }
30
+ public bool $ safe_device_enable = true ;
34
31
35
- public function hasTopbar (): bool
36
- {
37
- return false ;
38
- }
32
+ public string $ totp_code ;
39
33
40
34
public function mount ()
41
35
{
@@ -145,14 +139,14 @@ protected function get2FaFormComponent(): Component
145
139
->extraInputAttributes (['class ' =>'text-center ' ,'style ' =>'font-size:2.6em; letter-spacing:1rem ' ])
146
140
->live ()
147
141
->afterStateUpdated (function ($ state ) {
148
- $ requiredLength = config ('two-factor.totp.digits ' );
149
- if (strlen ($ state ) == $ requiredLength ) {
142
+ if (strlen ($ state ) === config ('two-factor.totp.digits ' )) {
150
143
$ this ->submit ();
151
144
}
152
145
}),
153
146
Toggle::make ('safe_device_enable ' )
154
147
->label (__ ('filament-2fa::two-factor.enable_safe_device ' ,['days ' => config ('two-factor.safe_devices.expiration_days ' )]))
155
148
->hintIcon ('heroicon-o-information-circle ' ,__ ('filament-2fa::two-factor.safe_device_hint ' ))
149
+ ->hintColor ('info ' )
156
150
->inline ()
157
151
->onColor ('success ' )
158
152
->offColor ('danger ' )
You can’t perform that action at this time.
0 commit comments