Skip to content

Password rehashing doesn't work when using basic / onceBasic #50627

@joostdebruijn

Description

@joostdebruijn

Laravel Version

11.0.7

PHP Version

8.3.4

Database Driver & Version

MariaDB 10.11.7

Description

The default hashing method of my application is argon2id. However, I've still some users with a bcrypt password.

PR #48665 introduces password rehashing - that's enabled in my application. However, if a user authenticates via basic or onceBasic, the password is not rehashed and the error is thrown. In Laravel 10 they were able to login (keeping their bcrypt hashed password), however in Laravel 11 an error is being triggered: This password does not use the Argon2id algorithm., which is true - but I would expect that they can login and that their password will be rehashed. If a user use the 'normal' login via Auth::attempt() it works properly.

I'm willing to prepare a PR to solve this, but I've no time to dive into it on short term - so I just created this issue for now.

Steps To Reproduce

  1. Create a user with a bcrypt hashed password in a Laravel 11 application
  2. Set the HASH_DRIVER to argon2id
  3. Try to login with the user via basic or onceBasic, the login attempt will fail

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions