A reader could potentially press back in their browser after using their passcode, we handle this by showing the PasscodeUsed page component instead of an error occuring.
The PasscodeUsed page component was very much specific for the create account flow, even linking to /welcome/password when the CTA was clicked.
This PR updates this so that the component can be modified depending on the current flow, so for reset password flows we show a different set of copy instead.
We may need to update this further when we come to add sign in with passcodes, but if we need it then we'll update closer to the time.
We also add /reset-password/password and /set-password/password to the valid routes array, as the PasswordUsed component now expects them when we do href={buildUrlWithQueryParams(``${path}/password``, {}, queryParams)} and they'll be needed for (re)set password with passcodes anyway, the first of is being implemented in https://github.com/guardian/gateway/pull/2852
What does this change?
A reader could potentially press back in their browser after using their passcode, we handle this by showing the
PasscodeUsed
page component instead of an error occuring.The
PasscodeUsed
page component was very much specific for the create account flow, even linking to/welcome/password
when the CTA was clicked.This PR updates this so that the component can be modified depending on the current flow, so for reset password flows we show a different set of copy instead.
We may need to update this further when we come to add sign in with passcodes, but if we need it then we'll update closer to the time.
We also add
/reset-password/password
and/set-password/password
to the valid routes array, as thePasswordUsed
component now expects them when we dohref={buildUrlWithQueryParams(``${path}/password``, {}, queryParams)}
and they'll be needed for (re)set password with passcodes anyway, the first of is being implemented in https://github.com/guardian/gateway/pull/2852/welcome
)/(re)set/password
)