feat: Add change password, reset password, and new sync device notification emails. #26
Conversation
| <table border="0" cellpadding="0" cellspacing="0" width="70%" style="border-collapse:collapse !important;mso-table-rspace:0pt;mso-table-lspace:0pt;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;"> | ||
| <tr> | ||
| <td valign="top" class="bodyContent" mc:edit="body_content" style="text-align:center;padding-left:20px;padding-bottom:30px;padding-right:20px;padding-top:30px;font-family:Helvetica;mso-table-rspace:0pt;mso-table-lspace:0pt;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#8A9BA8;line-height:13px;font-size:11px;"> | ||
| {{{t "This is an automated email; if you didn't change the password to your Firefox Account, you should reset it immediately at <a href='https://accounts.firefox.com/reset_password?email=%(encodedEmail)s'>https://accounts.firefox.com/reset_password</a>."}}} |
shane-tomlinson
Feb 22, 2015
Author
Member
https://accounts.firefox.com/reset_password?email=%(encodedEmail)s
Maybe a better solution is to pass in the entire link, that way it can be customized per deployment and there is less for localizers to worry about.
https://accounts.firefox.com/reset_password?email=%(encodedEmail)s
Maybe a better solution is to pass in the entire link, that way it can be customized per deployment and there is less for localizers to worry about.
| text: localized.text, | ||
| html: localized.html, | ||
| headers: { | ||
| 'Content-Language': translator.language |
pdehaan
Feb 24, 2015
Contributor
Should this have an 'X-Link': link as well?
(I'm guessing "no" since I dont see a values = { link: ... })
Should this have an 'X-Link': link as well?
(I'm guessing "no" since I dont see a values = { link: ... })
shane-tomlinson
Feb 25, 2015
Author
Member
@pdehaan - your guess is correct, this email does not send a link. I should document that.
@pdehaan - your guess is correct, this email does not send a link. I should document that.
| @@ -0,0 +1,5 @@ | |||
| {{t "Password Change Successfully" }} | |||
pdehaan
Mar 17, 2015
Contributor
"Change" or "Changed" (past tense)?
If it's "Change" we may need more words.
If it's "Changed" then it's probably fine and matches the "successfully changed" text on line 2 below.
I didn't see that string in the HTML version of this email, so I can't compare.
"Change" or "Changed" (past tense)?
If it's "Change" we may need more words.
If it's "Changed" then it's probably fine and matches the "successfully changed" text on line 2 below.
I didn't see that string in the HTML version of this email, so I can't compare.
|
So, is this ready for review. It has a WIP label on it. |
65a3ad4
to
3a3dc9d
ed5a8fe
to
1c94226
|
I'm calling this ready. Goes with mozilla/fxa-auth-server#876 This can merge before the auth server work. @rfk - r? |
| } | ||
| } | ||
| return this.send(email) | ||
| } |
rfk
Jun 10, 2015
Member
There's a lot of structural dupliction in these functions. @shane-tomlinson do you think there's scope for factoring out a common helper here? (Maybe in a follow-up PR, but worth thinking about)
There's a lot of structural dupliction in these functions. @shane-tomlinson do you think there's scope for factoring out a common helper here? (Maybe in a follow-up PR, but worth thinking about)
shane-tomlinson
Jun 10, 2015
Author
Member
@shane-tomlinson do you think there's scope for factoring out a common helper here?
I thought the same thing as I was copy-pasting. ;)
@shane-tomlinson do you think there's scope for factoring out a common helper here?
I thought the same thing as I was copy-pasting. ;)
| {{t "Your Firefox Account password has been successfully reset." }} | ||
|
|
||
| {{t "This is an automated email; if you didn’t reset the password to your Firefox Account, you should reset it immediately at %(resetLink)s" }} | ||
| {{t "For more information, please visit https://support.mozilla.org" }} |
rfk
Jun 10, 2015
Member
I'm not sure the top-level SUMO page will be much help, should we consider a dedicted article for this?
I'm not sure the top-level SUMO page will be much help, should we consider a dedicted article for this?
shane-tomlinson
Jun 10, 2015
Author
Member
We should, all of the previous emails suffer from the same problem.
We should, all of the previous emails suffer from the same problem.
| this.mailer = nodemailer.createTransport('SMTP', options) | ||
| this.sender = config.sender | ||
| this.verificationUrl = config.verificationUrl | ||
| this.initiatePasswordResetUrl = config.initiatePasswordResetUrl |
rfk
Jun 10, 2015
Member
This should be added to config.js for completeness
This should be added to config.js for completeness
shane-tomlinson
Jun 10, 2015
Author
Member
done
done
|
I guess we should get @ryanfeeley to sign off on the emails here as well, unless that's covered in a previous issue? |
|
@ryanfeeley - Can you have a look at the screen shots I pasted? I find the password reset one a bit strange. The user receives a notification email at the address they just verified when they reset their password.
Ignore all of this. The automated email bit is done on a different line. |
|
@rfk and @ryanfeeley - I also find the new sync device a bit strange, esp considering we do not offer the user any way to revoke access to the new device, nor do we give them any information about the device. Should we try to present some sensible device name based on UA string? I'm fine if something like this is a follow on PR, it just seems odd to send a notification email that provides little useful information and no way of revoking access. |
1c94226
to
e02f7fd
|
@shane-tomlinson Looks good, although try to follow the new template set by @johngruen with slightly different font sizing and the Firefox logo above used in the new verification email. Because changing the password disconnects all clients, perhaps for the new sync devices we should say: h1. Account Activity Notice p.A new device is now syncing with all of the devices connected to your Firefox Account. small.This is an automated email; if you didn’t add a new device to your Firefox Account, you should change your password immediately at [link]. For more information, please visit https://support.mozilla.org |
It looks like @johngruen's changes have not yet landed. I'm of the opinion, first in wins. The other has to update.
The text here looks the same except for the addition of the link in the footer? |
|
Thanks @ryanfeeley! I forgot to link to you above. |
|
From @johngruen in IRC:
|
e02f7fd
to
1384972
|
@ryanfeeley - updated the text. |
|
@ryanfeeley - I have a couple of comments after further testing.
|
|
@shane-tomlinson: checked out all the emails using the email on acid testing service. Everything looks right and the links are all working correctly! |
|
@shane-tomlinson Good idea. I would keep it singular (account, not accounts) e.g. "reset succesfully" in heading is fine to contrast "succesfully reset" in the body (if one way doesn't sink in by scanning the text, he other will) Avoid using "Your". I think deletion message is fine like that (right under Firefox Account heading). |
1384972
to
0f04878
|
From IRC: |
…cation emails. fixes #24
0f04878
to
064bfca
|
Here are all of the updated screens. We now have a symmetry that I can deal with. Thanks @ryanfeeley! Original emails (with updated titles)New emailsTitles |
|
Ship it! |
|
Thanks @ryanfeeley! @rfk - mind if I issue the refactor PR (See shane-tomlinson#2) separately, after this one? I have asked @zaach to hold off on the string extraction to slip this in, and don't want to hold up any longer than necessary, and honestly, I'm not completely happy with my cleanup. If that seems reasonable, could you do an r? |
|
SGTM, r+ |
…tions feat: Add change password, reset password, and new sync device notification emails.















fixes #24
Link to:
mozilla/fxa-js-client#146
mozilla/fxa-auth-server#876
mozilla/fxa-auth-server#941
mozilla/fxa-content-server#2129
mozilla/fxa-content-server#2561
mozilla/fxa-content-server#2562