How does Safari know when to prompt user to save password?

This related to How does browser know when to prompt user to save password? except mine is specific to Safari.

I have a website in which there are two different ways you can log in. The first is the main site in which you have to enter your email, password, and your account's domain. The second way is to actually go to your domain (which is pointing at my server) at which point you're only asked to enter in your email and password.

Logging in the second way (two inputs), Safari, Chrome and Firefox will all ask if I'd like to save my username and password (as expected).

But logging in the first way (three inputs), only Chrome and Firefox ask. Safari does not.

My form is not AJAX/Javascript. It has a form tag, a submit button, and three inputs with the ids/names - email, password (of type=password), and account_domain. I do not have autocomplete=off.

Does anyone know what Safari is looking for to ask to save username/passwords? Is it b/c I have three inputs instead of two?

As a note, I ran the same test on my wife's Mac using Safari only and she wasn't prompted to save in either case. So I don't know.

I verified that neither of us had clicked "never remember passwords" for either of these sites.

Answers


I was having this same issue, and your post answered my problem.

I just had a simple form that only requested a password, which would not prompt Safari on a mobile to save the password:

<fieldset>
<legend>Please login below:</legend>
<form role="form" id="access" name="access" method="post">
    <div class="form-group form-group-sm">
        <label for="password">Password</label>
        <input class="form-control" required type="password" placeholder="Enter Password" name="password" id="password" />
    </div>
    <div class="form-group form-group-sm">
        <input class="btn-lg btn-primary center-block" type="submit" value="Login" />
    </div>
</form>

After reading your post, I added a "username" input field as follows:

<fieldset>
<legend>Please login below:</legend>
<form role="form" id="access" name="access" method="post">
    <div class="form-group form-group-sm">
        <label for="username">Username</label>
        <input class="form-control" required type="text" placeholder="Enter Username" name="username" id="username" />
    </div>
    <div class="form-group form-group-sm">
        <label for="password">Password</label>
        <input class="form-control" required type="password" placeholder="Enter Password" name="password" id="password" />
    </div>
    <div class="form-group form-group-sm">
        <input class="btn-lg btn-primary center-block" type="submit" value="Login" />
    </div>
</form>

After adding that, I now got a prompt to save the password.

So I think Safari is looking for a username, name, email, etc. to tie along with a password field. I didn't test this too much, but I'm sure someone with more experience can verify that.

Thanks for your post.


Need Your Help

How to add an entry field dynamically in an empty collection form?

php symfony-forms symfony

I am encountering an issue with my form and I need help...

Mobile payment integration for my Android e-hailing app

android mobile paypal stripe-payments braintree

My startup is developing a real-time marketplace platform for taxi companies somewhat similar to Hailo, Get taxi, Uber and Lyft (more or less), etc.