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

Mask password fields #728

Open
drwelby opened this issue Feb 28, 2024 · 2 comments
Open

Mask password fields #728

drwelby opened this issue Feb 28, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed and we are accepting pull requests from anyone willing to take this on.

Comments

@drwelby
Copy link

drwelby commented Feb 28, 2024

OpenAPI supports optional "formats" on certain types:

https://spec.openapis.org/oas/v3.1.0#data-types

One of these is format: password for hinting to clients to mask the input.

This would be a useful addition so that docs can be used in demos and screencasts without revealing the presenter's password.

@drwelby drwelby added the enhancement New feature or request label Feb 28, 2024
@drwelby
Copy link
Author

drwelby commented Feb 28, 2024

I'm not very fluent in Typescript but after poking around I think that this could work with the existing components with

password = {param.format} or maybe password = {param.format | false} around here:

The question then is what should happen in the code samples - could they render as asterisks?

@sserrata sserrata added the help wanted Extra attention is needed and we are accepting pull requests from anyone willing to take this on. label Mar 12, 2024
@sserrata
Copy link
Member

Hi @drwelby, we looked at masking password input in the past but, since they are ultimately displayed in code snippets, it seemed like a moot point. Still, there may be some value in masking the input field since it's more visible.

I suppose we could find a way to mask in code snippets but still send the real password when "Send API Request" is clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed and we are accepting pull requests from anyone willing to take this on.
Projects
None yet
Development

No branches or pull requests

2 participants