Conversation
Because: - The email wasn't taking into account that the time in the config was specified in seconds This commit: - Introduces the correct calculation for when the code actually expires.
vpomerleau
left a comment
There was a problem hiding this comment.
Looks good, just checking it out locally now. Only one docs nit, non-blocking
| // Number of steps contained in the window. In this case | ||
| // 5 minutes worth of steps | ||
| default: 5 * 60, | ||
| doc: 'Overrides window otp options', |
There was a problem hiding this comment.
This is working differently from the window/step defined in otp config in this file, unless that config is unrelated? Maybe specifying that this overrides otplib options would be clearer for anyone checking back on this later.
There was a problem hiding this comment.
They are both valid configs. Neither is wrong... I agree normalizing how we define this makes sense though. More importantly we should double check how we calculate the actual expiration time and communicate this to end users.
I have a feeling the expiration time we communicate might not be correct in all cases. i.e. We don't take window and step into account, when doing the calculation, and this could lead to inaccuracies depending on how it is configured. I'll file a separate ticket for this.
Because
This pull request
Issue that this pull request solves
Closes: FXA-12400
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Other information (Optional)
Any other information that is important to this pull request.