Skip to content

The open alternative to Salesforce, designed for AI.

Add autofocus to 2FA OTP inputs (#23067)

martmull45b319ef2db6
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx
index e769c0d0983..adc962f4ffd 100644
--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx
+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx
@@ -233,6 +233,7 @@ export const SignInUpTOTPVerification = () => {
onBlur={onBlur}
onChange={onChange}
value={value}
+ autoFocus
render={({ slots }) => (
<StyledOTPContainer>
<StyledSlotGroup>
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx
index 1d44064be6a..5b015044953 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx
@@ -239,6 +239,7 @@ export const SettingsAdminServerAdminAccess = ({
maxLength={6}
value={otp}
onChange={setOtp}
+ autoFocus
render={({ slots }) => (
<StyledOTPContainer>
{slots.slice(0, 3).map((slot, index) => (
diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx
index 3f194c3f616..7a002f4d375 100644
--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx
+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx
@@ -34,6 +34,7 @@ export const TwoFactorAuthenticationVerificationForSettings = () => {
onBlur={onBlur}
onChange={onChange}
value={value}
+ autoFocus
render={({ slots }) => (
<StyledOTPContainer>
{slots.slice(0, 3).map((slot, idx) => (