Open enessvg opened 2 hours ago
Did you follow all the installation steps from the readme? @enessvg
@Baspa Yes
Can you provide me a reproduction repository? Then I'll be happy to help @enessvg
I can't provide it right now, but I can leave photos like this:
Deleted value code:
$this->twoFactorType = $this->challengedUser->two_factor_type;
@Baspa Maybe it's my fault, I'll install it in another project and try again. But as I said, I did the installation completely by following https://filamentphp.com/plugins/vormkracht10-2fa
Did you run migrations? Can you show me your user model and did you setup 2FA for the user? @enessvg
Did you run migrations? Can you show me your user model and did you setup 2FA for the user? @enessvg
Yes, I've run migrations. @Baspa
User.php: use Laravel\Fortify\TwoFactorAuthenticatable; use Vormkracht10\TwoFactorAuth\Enums\TwoFactorType;
use HasFactory, Notifiable, HasRoles, HasPanelShield, TwoFactorAuthenticatable;
protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'two_factor_type' => TwoFactorType::class, ]; }
What happened?
hello, I installed the plugin and opened 2fa, then when I tried to log in, I got an error like this: Attempt to read property “value” on null
In order to resolve this error vendor\vormkracht10\filament-2fa\src\Http\Livewire\Auth\LoginTwoFactor.php In line 44 $this->twoFactorType = $this->challengedUser->two_factor_type->value; It worked when I removed the value from the code, what is this caused by? can you check?
Translated with DeepL.com (free version)
How to reproduce the bug
Bu hatayı çözmek içinde vendor\vormkracht10\filament-2fa\src\Http\Livewire\Auth\LoginTwoFactor.php
Package Version
1.6^
PHP Version
8.2.4
Laravel Version
11.0.0
Which operating systems does with happen with?
Windows
Notes
No response