I have a web site in development. I want the user to be able to request a forgotten password.

Is there any tutorial on doing this? Otherwise I guess I can straight up write something simple as a first draft.

I don't keep the passwords in plain text, so I can't decrypt them as far as I know. So I think I have to generate a new password and then have an email with a link that takes them to a "change password now" page.

Your plan is the route I would probably go. If you are developing the website yourself, you will likely need to design the forgotten password code to integrate into your current system, therefore custom code would be preferable.

An alternative would be to email the user a "one time" password, which expires after say 24 hours. Upon logging in with this one time password, they are asked to provide a new password. I would also store / check the users IP upon request / on change just to be extra secure.