How to reset password without email?
I have followed the 1-click guide to deploy a locally hosted Twenty instance. When I did this, I started registering an account on the Twenty instance. But now I have forgotten the password.
There is a "Forgot password" feature, but it seems to rely on a working SMTP config. I do not have a working SMTP config and I am on a network that will now allow outgoing connections to SMTP servers.
How can I reset my user's password without using email?
I imagine this might be done by manually editing the internal postgres database. How do I obtain access to that and how do I reset the password in it?
4 Replies
Technically you can't restart the password without email BUT:
- if you want to do it directly in database, then here's how to access the database in Docker https://discord.com/channels/1130383047699738754/1281354088264634380/1281476293677944844, to update it, you have to generate new password using bcrypt and update it with this command
UPDATE core."user" set "passwordHash" = '{new_password_hash}' where id = '{user_id}';
(of course transaction is a must have as a security precaution) [I'm not sure if this even works]
- alternatively you can do it with SMTP by using smtp4dev which captures all emails sent to any address, this way you can simply restart your password without need to interfere with databaseThanks for instsructions on how to change password in the db. How do I gain access to the postgres db in the container, though? (sorry, new to docker)
I might install smtp4dev. But how do I instruct Twenty to use it?
In previous message I linked instructions
Sorry. Did not see the link, it just said "#unknown". I did not realize it was a link.
@ɃØĦɆᵾS this worked. Thanks!