-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STCOR-820 For the /reset-password route, allow token to be specified in the path or query arguments #1445
Conversation
|
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.
I have be honest, without any comments, I found this work hard to follow. IIUC, it used to be that CreateResetPasswordControl had a required token
prop that's now optional, and if the prop is absent it'll look for a query-string param named resetToken
. Is that correct, or at least partially so?
I realize the lack of documentation did not start with you, and I'm legit impressed with your ability to parachute in and figure out how to modify this component. For those of us who are less gifted, however, in-line comments are always appreciated :)
path="/reset-password/:token" | ||
path="/reset-password/:token?" |
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.
Petty: technically the ?
is not part of the path. It's not a problem that it's provided here, but at the same time it doesn't feel right. Also, why is being added here? That isn't clear, and since other path
props don't include it, it should be explained in a comment.
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.
I'll update with a comment. It's a react-router
convention that makes that part of the path optional. In this case it allows us to accept the path /reset-password?resetToken=ABC
.
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.
Nevermind, I misread it as /reset-password/token?
without the leading colon 🤦 and so thought this was something else. Sorry for the distraction.
…in the path or query arguments (#1445) * STCOR-820 Add support for optionaly passing token by URL param * Remove console.log * Update CHANGELOG.md
…in the path or query arguments (#1445) * STCOR-820 Add support for optionaly passing token by URL param * Remove console.log * Update CHANGELOG.md
…in the path or query arguments (#1445) * STCOR-820 Add support for optionaly passing token by URL param * Remove console.log * Update CHANGELOG.md
…in the path or query arguments (#1445) * STCOR-820 Add support for optionaly passing token by URL param * Remove console.log * Update CHANGELOG.md
…in the path or query arguments (#1445) * STCOR-820 Add support for optionaly passing token by URL param * Remove console.log * Update CHANGELOG.md
resetToken
which allows us to use longer keys since path has a much smaller allowable length than URL params<CreateResetPassword>
component since it's not used there.