Skip to content

fix: add autoComplete attribute for Apple 2FA autofill#5377

Open
SaaiAravindhRaja wants to merge 1 commit intoInfisical:mainfrom
SaaiAravindhRaja:fix/apple-2fa-autofill
Open

fix: add autoComplete attribute for Apple 2FA autofill#5377
SaaiAravindhRaja wants to merge 1 commit intoInfisical:mainfrom
SaaiAravindhRaja:fix/apple-2fa-autofill

Conversation

@SaaiAravindhRaja
Copy link

Fixes #1167

Problem

Apple's auto-fill feature fills "I n f i s i" instead of the verification code because the input fields are missing the autoComplete="one-time-code" attribute.

Solution

Added autoComplete="one-time-code" to all ReactCodeInput components in:

  • CodeInputStep.tsx (email verification during signup)
  • Mfa.tsx (MFA code input during login)

This tells Apple's autofill system that these fields expect one-time codes from emails/SMS.

@maidul98
Copy link
Collaborator

maidul98 commented Feb 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR adds autoComplete="one-time-code" to OTP/MFA ReactCodeInput components used during signup email verification (CodeInputStep.tsx) and login MFA flows (Mfa.tsx). This enables better iOS/Apple one-time-code autofill behavior for 2FA inputs without changing authentication logic or API interactions.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Changes are limited to adding a standard HTML autocomplete hint on existing OTP code inputs; no logic, security boundaries, or API/query behavior is modified.
  • No files require special attention

Important Files Changed

Filename Overview
frontend/src/components/auth/CodeInputStep.tsx Adds autoComplete="one-time-code" to the signup email verification ReactCodeInput fields to improve iOS OTP autofill behavior.
frontend/src/components/auth/Mfa.tsx Adds autoComplete="one-time-code" to MFA ReactCodeInput fields (email/TOTP) to improve iOS OTP autofill behavior.

@SaaiAravindhRaja
Copy link
Author

Thank you @maidul98 😆

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

Successfully merging this pull request may close these issues.

[ENG-238] Apple 2FA automatic fill not working

2 participants