aws-amplify / aws-amplify/amplify-ui

FR: 2FA Input whitespace is trimmed before submit

Open
#5,489 1 comment 0 reactions 0 assignees View on GitHub
Authenticator feature-request
Dominant language
TypeScript
Stars
1.1k
Forks
347
Avg merge
18h 29m
Merged PRs (30d)
9

Description

### On which framework/platform would you like to see this feature implemented?

React

### Which UI component is this feature-request for?

Authenticator

### Please describe your feature-request in detail.

# Feature Request: Trim Whitespace in 2FA Code Input Field

## Framework/Platform
**React**

## UI Component
**Authenticator**

## Feature Description
Currently, the input field for the 2FA (Two-Factor Authentication) code does not trim whitespace before submitting the code. This can lead to user frustration if they accidentally include leading or trailing spaces, causing their 2FA code to be rejected even though it is correct.

### Please describe a solution you'd like.

### Desired Behavior
The input field for the 2FA code should automatically trim any leading or trailing whitespace before submitting the code.

### We love contributors! Is this something 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

Open the contributing guide

Research direction

Start at the React Authenticator component and trace how the 2FA input value is handled immediately before submission. Confirm the expected behavior for leading and trailing whitespace, then verify that a code with surrounding spaces is submitted as the trimmed value without changing other input behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
authentication, frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.