-
Notifications
You must be signed in to change notification settings - Fork 32
Account Recovery: replace the server-side rendered form with an interactive React-based form #3016
Conversation
Deploying matrix-authentication-service-docs with
|
Latest commit: |
8e2c304
|
Status: | ✅ Deploy successful! |
Preview URL: | https://de7e1254.matrix-authentication-service-docs.pages.dev |
Branch Preview URL: | https://rei-fe-pwrecovery.matrix-authentication-service-docs.pages.dev |
@@ -6,7 +6,8 @@ | |||
"close": "Close", | |||
"continue": "Continue", | |||
"edit": "Edit", | |||
"save": "Save" | |||
"save": "Save", | |||
"save_and_continue": "Save and continue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action.*
namespace is shared with EW/EX, so I think we have to be slightly careful here. That key does not exist there yet, but it looks alright and fine to share. @t3chguy opinions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the text exists in Figma and seems a short reusable action such as this then I think its the right way to do it
response.data?.setPasswordByRecovery.status === SetPasswordStatus.Allowed | ||
) { | ||
// TODO HOW DO WE NAVIGATE | ||
router.navigate({ to: "/../login" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly window.location.href = '/login'
might be fine. Part of the annoying thing here is getting the exact app root, as MAS might be mounted on a subpath.
Maybe the best we can do is load the react app root (aka /account
) but with a full page load so that the backend takes care of redirecting us to /login, so something like
const router = useRouter(); // not in the if, because of the rules of hooks
const location = router.buildLocation({ to: "/" });
window.location.href = location.href;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup that works
Replace with the React frontend form
544b85d
to
8e2c304
Compare
Part of #172: the interactive form has a live-feedback meter for password complexity
TODO (would like your help please):
commit by commit :-)