aws-amplify / aws-amplify/amplify-ui
Ability to configure autocomplete value on password input field when using withAuthenticator
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 347
- Avg merge
- 18h 29m
- Merged PRs (30d)
- 9
Description
### Is this related to a new or existing framework?
React
### Is this related to a new or existing API?
Authentication
### Is this related to another service?
_No response_
### Describe the feature you'd like to request
I have a customer who recently underwent penetration testing. One of the findings was that the autocomplete attribute was not set to 'off' on the password input field (via the withAuthenticator HOC). I wasn't able to find a way to pass a value for this attribute into withAuthenticator such that it propagated correctly into the password field; it seems the only recourse would be to manually rebuild withAuthenticator's inner workings.
### Describe the solution you'd like
I'd like the ability to pass an argument into withAuthenticator() which allows me to target the Password input field and set autocomplete for it to any of its supported values.
If this solution was genericized, such as to allow me to specify a component inside of withAuthenticator (e.g., ), a field within that component (e.g., Password input), and an HTML attribute & value (e.g., autocomplete: 'off'), this would work, too.
### Describe alternatives you've considered
I've considered:
- manually rebuilding my customer's login page from the guts of withAuthenticator (skipping the HOC)
I've tried:
- using window.setTimeout to force autocomplete='off' after giving the application a second to render (since I don't have access to define hooks within the Amplify components)
- attempting to hack around it such as using window.onload or an event listener for DOMContentLoaded
### Additional context
_No response_
### Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the withAuthenticator implementation and the SignIn Password input it renders. Trace how component and field properties are passed through, then define the supported configuration boundary for the autocomplete value. Done means the requested value reaches the password field without rebuilding the authentication page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- authentication, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100