Activating google password manager prompt @ React-Native app

Viewed 943

I'm developing a new app for android with React-Native 0.63.4 and I want google services to prompt storing users credentials with google password manager. I'm using Formik to manage my form actions.

Here is the code:

            <View style={styles.formContainer}>
              <Input
                onChangeText={handleChange('email')}
                onBlur={(e) => {
                  handleBlur('email')(e);
                }}
                placeholder={emailPlaceholder}
                autoCompleteType="email"
                autoCapitalize="none"
                keyboardType="email-address"
                textContentType="emailAddress"
                value={values.email}
                isError={Boolean(errors.email && touched.email)}
                errorMessage={errors.email}
              />

              <PasswordInput
                placeholder={passwordPlaceholder}
                notFocusedText={continueToResetPassword}
                textContentType="password"
                onChangeText={handleChange('password')}
                onBlur={(e) => {
                  handleBlur('password')(e);
                }}
                value={values.password}
                isError={Boolean(errors.password && touched.password)}
                errorMessage={errors.password}
                notFocusedTextOnPress={() =>
                  navigation.navigate('EnterEmail', {
                    email: values.email,
                  })
                }
              />

              <Button text={isSubmitting ? '' : button} onPress={handleSubmit}>
                {isSubmitting ? <ActivityIndicator color="black" /> : null}
              </Button>
            </View>

Both <Input /> and <PasswordInput /> inherit from React-Native's <TextInput /> element and forward the {...props} as a last line before ">".

Props as textContentType and autoCompleteType are set, but I still don't have a prompt to store the credentials, what am I missing?

p.s. Other native apps are definitely prompted after a successful login, same way it's implemented in most web browsers. The question is how it's implemented in react-native if at all?

1 Answers

From your code, you haven't added autoCompleteType into <PasswordInput/>.
Try adding autoCompleteType="password" into your <PasswordInput/>.

Related