|
Hi there, Thank |
Answered by
lovasoa
Aug 30, 2023
Replies: 1 comment
|
Hello ! Usually password reset is implemented by sending an email with a secret URL containing a password reset token to the user. SQLPage itself cannot send emails. What you can do in SQLPage with standard SQL is generating a random password reset token, store it in the database, and use an external system to send the email. INSERT INTO password_reset_tokens(token, username) VALUES (sqlpage.random_string(32), :username)You can read: https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html If you really are using a postgres database and you really need to, you can send an email directly from postgres using an extension such as pgMail. |
0 replies
Answer selected by
MrTrebron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello ! Usually password reset is implemented by sending an email with a secret URL containing a password reset token to the user. SQLPage itself cannot send emails. What you can do in SQLPage with standard SQL is generating a random password reset token, store it in the database, and use an external system to send the email.
You can read: https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html
If you really are using a postgres database and you really need to, you can send an email directly from postgres using an extension such as pgMail.