takahe icon indicating copy to clipboard operation
takahe copied to clipboard

Password reset email should use first identity domain if available

Open TkTech opened this issue 2 years ago • 5 comments

The email templates for account_new.html and password_reset.html are hardcoded to use MAIN_DOMAIN instead of the current request domain.

TkTech avatar Nov 26 '22 15:11 TkTech

Yes, because they are sent from background workers rather than a view. MAIN_DOMAIN is going to have to be something that everyone uses for those links, at minimum, even if we redirect them to the service domain after login.

andrewgodwin avatar Nov 26 '22 16:11 andrewgodwin

Ah, I had a PR for this. I was using the domain from the user's first identity which I was considering the "default". Essentially, I'm "white labeling" this for family and friends, and I don't want the emails to send them to @tkte.ch instead of @gowoon.ca.

TkTech avatar Nov 26 '22 17:11 TkTech

Hmm, interesting - I had presumed that new accounts would not have an identity yet, so the Create Account email would have to go to MAIN_DOMAIN. You're right though, password resets could try their first identity.

andrewgodwin avatar Nov 26 '22 17:11 andrewgodwin

Yeah, the process right now is to create the domain, create a user, add an identity, then send them a password reset (since invites aren't there just yet)

TkTech avatar Nov 26 '22 17:11 TkTech

Grabbing this issue + taking the chance to spruce up the email templates with html

gwagstaff avatar Dec 22 '22 04:12 gwagstaff