Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Hash Facade from Authentication Controllers #390

Closed
wants to merge 1 commit into from

Conversation

ikamal7
Copy link

@ikamal7 ikamal7 commented Jun 24, 2024

This PR aims to remove the Hash facade from the authentication controllers, specifically where Hash::make($request->string('password')) is used for password hashing. This change is made to avoid duplicate password hashing, as it is already handled in the User model. By doing so, we can ensure consistency and reduce redundancy in our codebase.

Reasoning:

  • Consistency: Password hashing should be managed in one place, ensuring that any changes to the hashing mechanism are applied universally.
  • Redundancy: Removing duplicate hashing logic reduces redundancy and potential errors.
  • Maintenance: Centralizing password hashing in the User model simplifies maintenance and future updates to the hashing process.

Implementation:

  • Changed from Hash::make($request->string('password')) to $request->password.

Controllers Modified:

  • RegisteredUserController (api, default and inertia )
  • NewPasswordController (default and inertia)

@taylorotwell
Copy link
Member

No plans to change this at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants