Skip to content

Commit

Permalink
Update TwoFactorPage.php
Browse files Browse the repository at this point in the history
Allow user to back out of 2FA
  • Loading branch information
mwdr-mjdventures authored Sep 18, 2024
1 parent 93baeb6 commit bec3c0e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Pages/TwoFactorPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ protected function getFormSchema(): array
</x-filament::link>')))
->required()
->extraInputAttributes(['class' => 'text-center', 'autocomplete' => $this->usingRecoveryCode ? 'off' : 'one-time-code'])
->autofocus(),
->autofocus()
->suffixAction(
FormAction::make('cancel')
->ToolTip(__('filament-breezy::default.cancel'))
->icon('heroicon-o-x-circle')
->action(function () {
Filament::auth()->logout();
$this->mount();
})
),
];
}

Expand Down

0 comments on commit bec3c0e

Please sign in to comment.