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

PassphrasePrompt need title, body, and buttons #663

Open
davidz25 opened this issue Jun 25, 2024 · 2 comments
Open

PassphrasePrompt need title, body, and buttons #663

davidz25 opened this issue Jun 25, 2024 · 2 comments
Assignees

Comments

@davidz25
Copy link
Contributor

Just tried out PassphrasePrompt and it looks like this

image

and appears right after the consent prompt. This is really confusing, how would the user know what to do here? The answer is that they don't, we need some helpful text explaining what is going on. The other problem is that the code completely ignores the passed-in constraints.

To fix the first problem, we need PassphrasePrompt to take title and content and from showPresentationFlow() we should pass in "Enter PIN" or "Enter Passphrase" depending on the value of passphraseConstraints. For content we should put "Enter the PIN for the document" or "Enter the passphrase for the document", depending.

To fix the second problem, if the passphrase/PIN is not fixed length (when constraints.minLength == constraints.maxLength) then add a "Next" button. If not, call onPassphraseEntered() when the user has entered the fixed length.

Also, add a "Cancel" button, make showPassphrase() return String?, and return null when the the prompt is canceled (when the user presses the "Cancel" button)

@davidz25
Copy link
Contributor Author

davidz25 commented Jun 25, 2024

Also, I just noticed that showPassphrasePrompt() takes checkWeakPassphrase which doesn't make any sense ... this is a feature of PassphraseEntryField and it's intended to only be used when the user is creating a passphrase. So showPassphrasePrompt() should not take that as a parameter and it should pass checkWeakPassphrase = false to the underlying PassphraseEntryField.

@davidz25
Copy link
Contributor Author

It would be good to get this done soon.

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

No branches or pull requests

2 participants