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

Ask for password only once #117

Merged
merged 6 commits into from Dec 30, 2018
Merged

Ask for password only once #117

merged 6 commits into from Dec 30, 2018

Conversation

wbobeirne
Copy link
Member

Closes #96

Description

Adds a little background script to cache the password after you've entered it. Before asking for password, attempt to fetch from that cache. This method should be completely safe for a few reasons:

  1. The password is stored in memory, not using any long-term storage. Closing the browser will remove the password from memory, and any updates to the extension will clear the background context, so it won't ever be immediately available without the user entering it.
  2. The password is sent around using runtime.sendMessage(), which only communicates to contexts created by the extension, and doesn't communicate to the content script.
  3. All payments and invoice generation still require a prompt.
  4. You can uncheck the "Don't ask me again" checkbox if you want and no messages will be sent anywhere.

Steps to Test

  1. Perform an action that requires a password (e.g. click Deposit). Leave the checkbox checked.
  2. Close the popup, and perform that action again. Confirm you weren't asked for the password.
  3. Open the menu dropdown and click "Lock account". Perform the action again and confirm you were asked for the password.
  4. Enter the password, but uncheck the checkbox. Close the popup, perform the action again, and confirm you were asked for the password again.

Screenshots

screen shot 2018-12-28 at 1 59 16 pm

screen shot 2018-12-28 at 1 59 06 pm

@jamaljsr
Copy link
Collaborator

Great addition! I tested it and it works as described.

@wbobeirne
Copy link
Member Author

Awesome, thanks for giving it a look. I'll merge after I've tested and merged #108, since I know there will be conflicts.

@wbobeirne wbobeirne merged commit 0894e0e into develop Dec 30, 2018
@wbobeirne wbobeirne deleted the background-password-cache branch December 30, 2018 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants