From 5655241bef22264ad9da3d9ba2074af4e9ba7dd0 Mon Sep 17 00:00:00 2001 From: Brad Estey Date: Fri, 13 Dec 2024 12:14:31 -0500 Subject: Uppercase the auth factor token in input value to match the email casing. (#7094) --- src/screens/Login/LoginForm.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index 6a48b1bcc..2cd6abdd1 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -60,6 +60,8 @@ export const LoginForm = ({ const [isProcessing, setIsProcessing] = useState(false) const [isAuthFactorTokenNeeded, setIsAuthFactorTokenNeeded] = useState(false) + const [isAuthFactorTokenValueEmpty, setIsAuthFactorTokenValueEmpty] = + useState(true) const identifierValueRef = useRef(initialHandle || '') const passwordValueRef = useRef('') const authFactorTokenValueRef = useRef('') @@ -262,6 +264,7 @@ export const LoginForm = ({ textContentType="username" blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field onChangeText={v => { + setIsAuthFactorTokenValueEmpty(v === '') authFactorTokenValueRef.current = v }} onSubmitEditing={onPressNext} @@ -269,6 +272,13 @@ export const LoginForm = ({ accessibilityHint={_( msg`Input the code which has been emailed to you`, )} + style={[ + { + textTransform: isAuthFactorTokenValueEmpty + ? 'none' + : 'uppercase', + }, + ]} /> -- cgit 1.4.1