Skip to content

Commit

Permalink
Document breaking change in password rehashing if custom password fie…
Browse files Browse the repository at this point in the history
…ld (#9901)

* Document breaking change in password rehashing if custom password field

Also added missing likelihood-of-impact, which I'm calling "low" since most folks probably use the default 'password' field name.

* Update upgrade.md

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
sgilberg and taylorotwell authored Sep 19, 2024
1 parent a71a1ac commit 05e97a8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,15 @@ However, we do **not recommend** that Laravel 10 applications upgrading to Larav
<a name="password-rehashing"></a>
#### Password Rehashing

Laravel 11 will automatically rehash your user's passwords during authentication if your hashing algorithm's "work factor" has been updated since the password was last hashed.
**Likelihood Of Impact: Low**

Laravel 11 will automatically rehash your user's passwords during authentication if your hashing algorithm's "work factor" has been updated since the password was last hashed.

Typically, this should not disrupt your application; however, if your `User` model's "password" field has a name other than `password`, you should specify the field's name via the model's `authPasswordName` property:

protected $authPasswordName = 'custom_password_field';

Typically, this should not disrupt your application; however, you may disable this behavior by adding the `rehash_on_login` option to your application's `config/hashing.php` configuration file:
Alternatively, you may disable password rehashing by adding the `rehash_on_login` option to your application's `config/hashing.php` configuration file:

'rehash_on_login' => false,

Expand Down

0 comments on commit 05e97a8

Please sign in to comment.