Skip to content
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

Add "Change Password" functionality #177

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Add "Change Password" functionality #177

merged 2 commits into from
Aug 16, 2023

Conversation

JSKitty
Copy link
Member

@JSKitty JSKitty commented Aug 14, 2023

Abstract

This PR adds the ability for users to change their MPW encryption password at runtime; this button is located in the Wallet Settings, and is only shown when a wallet is locally encrypted in the database already (i.e: immediately after encrypting, the setting becomes available).
image

This PR re-uses the "Encrypt Wallet" code and UI flow, by a hidden "Current Password" input that reveals itself when necessary, and updating the modal title accordingly.

image

In the backend, it essentially is just calling 'encryptWallet' and overwriting the existing wallet encWif in the database.


Testing

To test this PR, it's suggested to attempt these user flows, or variations of these:

  • Create a new wallet.
  • Encrypt your wallet (note your address down).
  • Visit Settings -> Wallet, and Change Password.
  • Reload MPW, unlock using your new password, check that your address is correct.

Feel free to try various testing methods: like changing your password multiple times, or trying to break the "Change Password" UI or functionality.


What does this PR address?

It allows users to finally change their MPW password, which previously, was unchangeable and permanent.

What features or improvements were added?

It adds a simple "Change Password" button to the Wallet Settings.

How does this benefit users?

Sometimes, users just want to change their password: perhaps they dislike the old one, would like a more complex/simple one, or they just routinely change passwords for security, this fits all of such usecases.

@JSKitty JSKitty added Enhancement New feature or request Awaiting Review This PR and/or issue is awaiting reviews before continuing. labels Aug 14, 2023
@JSKitty JSKitty requested review from Luke-Larsen, Liquid369, BreadJS and a team August 14, 2023 20:47
@JSKitty JSKitty self-assigned this Aug 14, 2023
@JSKitty JSKitty added the Review Reward: 20 PIV Reviewers of this Pull Request will receive a 20 PIV reward label Aug 15, 2023
@BreadJS
Copy link

BreadJS commented Aug 16, 2023

In order to use less space I changed the size of the hr tags. If you agree I will commit the changes and approve.
image

@JSKitty
Copy link
Member Author

JSKitty commented Aug 16, 2023

Smaller HR looks fine to me!

Copy link

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 6fd581d

@JSKitty JSKitty merged commit 77d70cd into master Aug 16, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Review This PR and/or issue is awaiting reviews before continuing. Enhancement New feature or request Review Reward: 20 PIV Reviewers of this Pull Request will receive a 20 PIV reward
Projects
Development

Successfully merging this pull request may close these issues.

3 participants