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

Prevent browser from saving password #40

Open
victorevector opened this issue May 12, 2022 · 2 comments
Open

Prevent browser from saving password #40

victorevector opened this issue May 12, 2022 · 2 comments

Comments

@victorevector
Copy link

This isn't a bug, but I was curious to get some feedback. I use VGS collect to collect a one-time pin from users. I would like to prevent the browser from prompting the user to save the pin as a "password". Does this library support a use-case like that?

@AnnaKudriasheva
Copy link
Collaborator

@victorevector I can suggest using input type text with masking:

const name = form.field('#card-name', {
  type: 'text',
  name: 'pin',
  validations: ['required'],
}).mask('9999', '*');

Would that be a suitable option for you?

@dleis612
Copy link

dleis612 commented Jun 2, 2022

@AnnaKudriasheva I attempted to use this solution, but ran into some issues. First, when the input gains focus, it automatically populates with the mask '****'. Then, when I type numbers into the field, the mask updates to show a combination of numbers and '*' (something like '12**'). If I were to input 4 numbers, it would look like this: '1234'. The desired functionality would be to replicate an input field of type password, but not allow Chrome to save the value. Any help would be greatly appreciated!

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

3 participants