Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Saniori's avatar

Password dehydration bug in filament

Hello there! I have a bug with dehydration of password in filament when i try dehydrate a password i get hash in input.

Code of auth section

Section::make('Auth')->schema([
    TextInput::make('email')
        ->label('Mail')
        ->required()
        ->unique('accounts', ignoreRecord: true)
        ->rules(Rules::EMAIL),
    TextInput::make('password')
        ->password()
        ->rules(Rules::PASSWORD)
        ->label('Password')
        ->dehydrateStateUsing(fn($state) => Hash::make($state))
        ->dehydrated(fn($state) => filled($state))
        ->required(fn (Page $livewire) => ($livewire instanceof CreateRecord))
])->columnSpan(2),
0 likes
2 replies
Snapey's avatar

Passwords are hashed. This is a one-way process.

You cannot, and should never send the password to the client.

Saniori's avatar

@Snapey I don't need to show the password to the client, I need to save the password only if it is entered.

Please or to participate in this conversation.