fix(auth): use password type for API key input #9858
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This uses the
password
type for the input filed forapi_key_value
to hide the value and not expose it via autocomplete. This makes it consistent with the client secret input and basic auth password fields that already do this. See screenshots belowI also added a small docs change in a separate commit, let me know if that needs a separate PR.
Motivation and Context
With a plain
text
type the API key would be shown during entry, which can be an issue when sharing screens or demoing API specs using swagger UI.It was also remembered across sessions by browsers so it could be exposed via autocomplete.
With this, autocomplete still works with password managers but is not automatically exposed. To my knowledge this shouldn't be a breaking change, WDYT?
I could not find any open issues related to this but let me know if I missed any!
⚒️ with ❤️ by Siemens
How Has This Been Tested?
See screenshots below, following the
setting-up.md
guide and running the petstore locally.Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests