How do I recover the password of the admin user? the one you create when installing filamentphp?

How do I recover the password of the admin user? the one you create when installing filamentphp?
4 Replies
cheesegrits
cheesegrits15mo ago
You can't. Filament just uses the default Hash facade for hashing the password into the user table, so that's either a Bcrypt or Argon2 hash, which is very much a one way encryption.
wotan6891
wotan6891OP15mo ago
recommendation
cheesegrits
cheesegrits15mo ago
You'll have to reset the password. Not really a Filament thing, it's a Laravel thing. If you are completely locked out, you'll need to reset it on the command line. Maybe use tinker ...
php artisan tinker
php artisan tinker
... then ...
$user = App\Models\User::where('email', '[email protected]')->first();
$user->password = Hash::make('YourNewPassword');
$user->save();
$user = App\Models\User::where('email', '[email protected]')->first();
$user->password = Hash::make('YourNewPassword');
$user->save();
Adjust accordingly.
wotan6891
wotan6891OP15mo ago
thank you
Want results from more Discord servers?
Add your server