Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork

Uppercase the auth factor token in input value to match the email casing. (#7094)

authored by Brad Estey and committed by GitHub 5655241b add7a91d

Changed files
+10
src
screens
+10
src/screens/Login/LoginForm.tsx
··· 60 const [isProcessing, setIsProcessing] = useState<boolean>(false) 61 const [isAuthFactorTokenNeeded, setIsAuthFactorTokenNeeded] = 62 useState<boolean>(false) 63 const identifierValueRef = useRef<string>(initialHandle || '') 64 const passwordValueRef = useRef<string>('') 65 const authFactorTokenValueRef = useRef<string>('') ··· 262 textContentType="username" 263 blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field 264 onChangeText={v => { 265 authFactorTokenValueRef.current = v 266 }} 267 onSubmitEditing={onPressNext} ··· 269 accessibilityHint={_( 270 msg`Input the code which has been emailed to you`, 271 )} 272 /> 273 </TextField.Root> 274 <Text style={[a.text_sm, t.atoms.text_contrast_medium, a.mt_sm]}>
··· 60 const [isProcessing, setIsProcessing] = useState<boolean>(false) 61 const [isAuthFactorTokenNeeded, setIsAuthFactorTokenNeeded] = 62 useState<boolean>(false) 63 + const [isAuthFactorTokenValueEmpty, setIsAuthFactorTokenValueEmpty] = 64 + useState<boolean>(true) 65 const identifierValueRef = useRef<string>(initialHandle || '') 66 const passwordValueRef = useRef<string>('') 67 const authFactorTokenValueRef = useRef<string>('') ··· 264 textContentType="username" 265 blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field 266 onChangeText={v => { 267 + setIsAuthFactorTokenValueEmpty(v === '') 268 authFactorTokenValueRef.current = v 269 }} 270 onSubmitEditing={onPressNext} ··· 272 accessibilityHint={_( 273 msg`Input the code which has been emailed to you`, 274 )} 275 + style={[ 276 + { 277 + textTransform: isAuthFactorTokenValueEmpty 278 + ? 'none' 279 + : 'uppercase', 280 + }, 281 + ]} 282 /> 283 </TextField.Root> 284 <Text style={[a.text_sm, t.atoms.text_contrast_medium, a.mt_sm]}>