Add edit password functionality
Closed this issue ยท 9 comments
The user should be able to change their password.
Similar to change username.
Should we have a label
associated with the name
attribute for better accessibility?
That's what Kent C. Dodds says
in this video
like this:
<div>
{/* adding a label - htmlFor="usernameInput" */}
<label htmlFor="usernameInput">Username:</label>
<input id="usernameInput" type="text" />
</div>
In our code it would be something like this:
<label htmlFor="yourNewPasSwordInput">
<TextField
id="yourNewPasSwordInput"
</label>
I think the text field from material ui adds a label. Inspect the code on the page and see if that is the case.
Ok
๐ธ ๐
Hey @raae
this is working in localhost now ๐ธ
Should I add some error handling?
I found at least these error messages in the userbase docs:
CurrentPasswordMissing
CurrentPasswordIncorrect
PasswordAttemptLimitExceeded
PasswordMustBeString
PasswordCannotBeBlank
PasswordTooShort
PasswordTooLong
LILLIAN OLA BNEDICTE
LILLIAN OLA BNEDICTE
Did an intern (๐ฆ 5,5) join you for this mornings coding session?
Yes you should probably do some error handling, something like this:
const { error } = await dispatch(updateUser(...))
if (error) {
// Make error appear on screen
} else {
navigate(`/profile`)
}
Supert!
I'll look into it!
๐ธ