I want to send an Email to the user with a link to a login-Page, that includes a hashed password/token/key as a parameter (but not a username).
Then I want to give the user access to the application, if there is an entry with that key in the user database.
My idea was to iterate through the database and looking for a password-match with bcrypt. But it seems bcrypt only returns a promise, not an boolean (as I hoped).
The goal is a one-way-key to the application: the user clicks the link, filled out the form and on submit the useraccount will be deactivated.
What is a common way to solve this problem?