zubhub icon indicating copy to clipboard operation
zubhub copied to clipboard

(feat) Add the ability to change password from edit profile form

Open coderatomy opened this issue 2 years ago • 5 comments

Summary

fixes #904 Adds ability to change password from /edit-profile

Changes

  • Improves validation and error handling in the Edit Profile form
  • Improves how form submission is handled. Utilizing the handleSubmit function from formik such that form submission is immediately cancelled if any validation errors exist. Sometimes our custom validation can have some loop holes.

Screencasts

Screencast from 2023-10-26 15-27-09.webm

coderatomy avatar Oct 26 '23 12:10 coderatomy

hello @coderatomy , you did a great job here! Thanks for that! few things that I'd like us to deliberate on:

  • have something against having the option to change the password alongside other things here (I didn't follow the conversation on the issue or I would have said the same thing there. I am also going to mention @srish and @tuxology here so they can give their opinion). It's been the standard practice to separate these two flows as one deals with a general change of data while the other deals with a kind of change that can affect a user's ability to log in. We can have a link from the edit-profile page that takes us to the change-password page, but both should not be on the same page. additionally, there should be some form of re-authentication before a user can be redirected to the change-password page (I think we missed implementing this before but it is important).

What I propose is something like this [some link on the edit-profile page] ------------> [page where the user re-authenticates with their old password] -------------------------------> [change-password page]

NdibeRaymond avatar Oct 29 '23 21:10 NdibeRaymond

@NdibeRaymond I agree about this as well. I see that @srish approved this more simple design here (https://github.com/unstructuredstudio/zubhub/issues/904#issuecomment-1769780681). I think the rationale why we have mixed both "Edit Profile" and "Account Settings" workflow is because the Edit Profile page allows you to change username, location, personal details etc. Which is very similar to "account" related info. Hence, we can, for now also allow changing password via that workflow as well. We can have a dedicated change password/account settings button some where which can do a similar workflow as yours and then we can phase out this change. We would need UX input for that and I think it would look similar to your approach

tuxology avatar Oct 30 '23 18:10 tuxology

hey @coderatomy please link this PR to #984 so that redundant work can be avoided. Once this PR is merged I can work on moving the edit profile to the sidenav. Thanks!

aqsaaqeel avatar Nov 14 '23 19:11 aqsaaqeel

hey @aqsaaqeel , i think you can go on with this, just go through the comments here to get the context, then get out what might be useful from this PR and use it. My main priority now is on the Migrations. Kindly help me with that.

coderatomy avatar Nov 15 '23 15:11 coderatomy

hey @aqsaaqeel , i think you can go on with this, just go through the comments here to get the context, then get out what might be useful from this PR and use it. My main priority now is on the Migrations. Kindly help me with that.

Alright!

aqsaaqeel avatar Nov 15 '23 19:11 aqsaaqeel