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

Unable to retrieve password using Forgot Password feature while running the DB locally #44

Open
akhan85 opened this issue Mar 6, 2020 · 7 comments

Comments

@akhan85
Copy link

akhan85 commented Mar 6, 2020

Is there a way to recover a password from the database for an account created if the application is running on a local server i.e. without being hosted anywhere. I am currently running a DB instance on my laptop and if I try to use the forgot password feature, I run into the following error:

image

File path: silsilah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php

@nafiesl
Copy link
Owner

nafiesl commented Mar 8, 2020

Hi @akhan85, I will try to reproduce it first, thanks for reporting this.

@akhan85
Copy link
Author

akhan85 commented Mar 13, 2020

No problem. Let me know if I can add any further details to help reproduce the issue. Thanks.

@nafiesl
Copy link
Owner

nafiesl commented Mar 15, 2020

Hi @akhan85, I have managed reproducing the same error like you did.

screen_20-03-15_002

In the current condition, this email reset password is depend on password reset email feature, which is built in feature of laravel.

Possible solutions:

If you were host your app in localhost, then I think we can pick one of these options to reset user's password:

  1. Direct DB update using this hashed "password" string. We can use this sql script
UPDATE `users` SET `password`='$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi' WHERE  `id`='{your-user-id}';
  1. If we were logged in, and we were the one who have created the user, then we can set (replace) the user's password on user's edit page.

screen_20-03-15_006

@akhan85
Copy link
Author

akhan85 commented Mar 16, 2020

Thank you for your response @nafiesl . So I can't use the second option as it would require that I remember the password in the first place (which I don't) and am able to login. For the first option, can you tell me where to run that script exactly? Thanks again.

@nafiesl
Copy link
Owner

nafiesl commented Mar 16, 2020

For the first option, you can run it on your MySQL client app, for me, I can run it on HeidiSQL, on the Query tab.

screen_20-03-16_008

@akhan85
Copy link
Author

akhan85 commented Mar 16, 2020

Ok so here is what I found on my end. I am using MySQL Workbench client. I had to slightly modify the UPDATE command and use
UPDATE 'table_name'.users instead. So in the case of the screenshot that you have attached it would be UPDATE lv_2017_silsilah.users

I think that I have cleared the password field altogether in the DB. I am guessing I was supposed to find the hashed password string first and it would have been unique to my case? In any case, I still get a 'These credentials do not match our records.' when attempting to log in using a blank entry for password or by using what I think is the old password.

@gusem
Copy link

gusem commented Dec 25, 2020

assalamualaykum,, Maaf mas mau tanya,, di hosting juga error untuk fitur lupa password,, saya sesuaikan di env untuk smptnya tapi masih dapet error
image
terima kasih

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

No branches or pull requests

3 participants