filament-breezy
filament-breezy copied to clipboard
Force 2FA
Hi there,
I am starting to use the filament breezy implementation in a new project. I need the users to force setting up an 2FA, so no opt-in.
I found out in your Login component how to do this, except I am not sure how to then force the user to generate the code. I don't see the possibility to generate the QR code. This is only possible on the profile page?
How to do this right after login?
I've made some changes to the Login component, this is one. This way i try to render the view. But I get some errors about missing property $form.
public function render(): View
{
if ($this->showCodeForm) {
if ($this->user->has_confirmed_two_factor) {
$view = view("filament-breezy::two-factor");
} else {
$view = view('livewire.auth.setup-2fa');
}
} else {
$view = view('filament-breezy::login');
}
$view->layout("filament::components.layouts.base", [
"title" => __("filament::login.title"),
]);
return $view;
}
@dejury I would like to implement this as an option in the next release. The way I see this working is, immediately after login, if config option force_2fa = true then redirect the user to the QR code for scanning otherwise they cannot access. Once they've scanned and setup their authenticator app then a button could direct them to enter/confirm their code.
What do you think?
I think it would be even better to confirm their code on the same page as QR scanning, to prevent locking themselves out (for example: incorrect scan, or manually made a typo).
Sounds great!
@jeffgreco13 Do you have any idea when to implement this? Or maybe I could help you with it?
Hi @jeffgreco13 Thanks for your awesome package, in fact I've installed and configured it (enabled in config file and I can enable if via profile) but when I login it doesn't ask me to type the code, am I missing something ?
Hey everyone. I am rolling out some new features to breezy very soon which includes a way to force 2fa. I expect to release in about 8 days
@aeq-dev did you enable the config option and then enable 2fa from My Profile?
@jeffgreco13 Thanks for reply, and yes I enabled the config option and my profile, I'm on Laravel 9.25.1 Thanks
I'm really sorry about this issue, it's my mistake, I forgot to set 'login' => in filament config auth
Sorry again...
but I've just found a small issue in translation here : filament-breezy::default.password_confirm.heading (not translated)
on password confirmation to enable it, I'm using Arabic language.
Thanks
Would love to see this update and test it :)
@jeffgreco13 is there any news when there will be an update with a forced 2fa?
This will be implemented in Breezy v2 which is coming for Filament v3 beta release. Thank you.