What's New
Bug Fixes
- fix(admin): hide the two-factor section when the user model does not support it (#690)
The account page showed the two-factor section as soon as shopper.auth.2fa_enabled was true. With a user model that does not implement Shopper\Contracts\HasStoreAuthentication, opening the page threw a TypeError from TwoFactor::user(). Shopper\Livewire\Pages\Account now also checks the contract, as the login and password reset pages already do, and hides the section when the model does not implement it.
Upgrading
composer update "shopper/*"If you keep your own copy of account.blade.php in resources/views/vendor/shopper/livewire/pages/, replace @if (config('shopper.auth.2fa_enabled')) with @if ($twoFactorEnabled).
Contributors
Full Changelog: v2.12.0...v2.12.1