laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.21k stars 10.9k forks source link

user appears to be logged out when password is updated (fortify) #51426

Closed comhon-project closed 4 months ago

comhon-project commented 4 months ago

Laravel Version

v11.7.0

PHP Version

8.2

Database Driver & Version

mariadb

Description

in my single page application, after updating user password with fortify route PUT /user/password user appears to be logged out when requesting server again.

My investigation : In my App\Actions\Fortify\UpdateUserPassword, if I remove the line 'password' => Hash::make($input['password']),, the user still logged in and he can request server again as a logged user (but of course password is not updated).
So I assume the password is "linked" to the user session and when we update it, the session is not valid anymore ?

(I tried to update config file hashing.php with 'rehash_on_login' => false, but this does not solve the problem)

Steps To Reproduce

using laravel fortify :

driesvints commented 4 months ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!