maybe icon indicating copy to clipboard operation
maybe copied to clipboard

Add forgot password flow

Open tmyracle opened this issue 1 year ago • 12 comments

Auth0 previously provided this functionality. We'll need to do a few things to replace that, off the top of my head:

  • Update sign in page with "Forgot password?" link
  • Add forgot password UI to capture email and show confirmation once forgot password email is sent
  • UI for specifying new password after clicking link in forgot password email
  • Generate token and handle token validation for sending email and when user clicks on the link in the forgot password email
  • Update server for handling sending the emails

This is low priority for right now.

tmyracle avatar Jan 14 '24 18:01 tmyracle

I would like to work on this

sy425191 avatar Jan 14 '24 22:01 sy425191

Same, I'd love to help on this

Neumand avatar Jan 15 '24 16:01 Neumand

Whoever would like to work on, go for it. Generally speaking, if you start working on, create a draft PR to show your progress.

That can help reduce multiple people working on the same issue.

Shpigford avatar Jan 15 '24 18:01 Shpigford

I'm still on it, please see #117 . Having a hard time testing with Postmark, though. Can't send an email to my private address 😅 Probably need to set up an own domain so I can test this.

What's missing now is:

  • UI for actually resetting the email + hooking it up with the BE to do the reset
Bildschirmfoto 2024-01-20 um 16 41 33 Bildschirmfoto 2024-01-20 um 16 41 46

eneskaya avatar Jan 20 '24 16:01 eneskaya

@eneskaya are the email templates managed in Postmark itself? I can't seem to find any in the repo and looks like its just referencing them by id. Might make sense to move to something like React Email so that the templates are in source control and you can style them with React and Tailwind. They also play nice with Postmark, Resend, Nodemailer, SendGrid, Plunk, and AWS SES

tmyracle avatar Jan 20 '24 18:01 tmyracle

There were indeed templates managed in Postmark, but we closed that account so lost access to them. :(

Shpigford avatar Jan 20 '24 19:01 Shpigford

@eneskaya are the email templates managed in Postmark itself? I can't seem to find any in the repo and looks like its just referencing them by id. Might make sense to move to something like React Email so that the templates are in source control and you can style them with React and Tailwind. They also play nice with Postmark, Resend, Nodemailer, SendGrid, Plunk, and AWS SES

That is a very good point. Right now I'm setting a raw text body, but wanted to bring up whether having the templates in the code base wouldn't make more sense. React Email would be a perfect candidate here, I agree! I will add it.

The issue still remains though with local testing, but we could wait with that until we have SMTP support, which would make testing easier.

eneskaya avatar Jan 20 '24 19:01 eneskaya

@Shpigford do you happen to have screenshots/examples?

rebuild

tmyracle avatar Jan 20 '24 19:01 tmyracle

@tmyracle Been digging a bunch and can't find anything. :( Will keep looking, but not looking great.

Shpigford avatar Jan 20 '24 19:01 Shpigford

@tmyracle Where exactly would you put the email templates?

eneskaya avatar Jan 20 '24 20:01 eneskaya

@eneskaya depends on what we decide to use for templating moving forward, my vote would be for React Email mentioned above since you can write emails as react components and it takes care of cross-client support and generating the html for you. Might have to put this on pause until we get a templating solution in place.

tmyracle avatar Jan 20 '24 20:01 tmyracle

@eneskaya depends on what we decide to use for templating moving forward, my vote would be for React Email mentioned above since you can write emails as react components and it takes care of cross-client support and generating the html for you. Might have to put this on pause until we get a templating solution in place.

I was talking about where to put them in the monorepo 😁 But let me create a new issue for the email templates, and we can discuss there

eneskaya avatar Jan 20 '24 20:01 eneskaya

Not relevant anymore

tmyracle avatar Feb 01 '24 23:02 tmyracle