How to make on Swift-Wkwebview auto fill username and password?

1.2k views Asked by At

i have one question. I want to make on my application auto fill username password with keychain. Im added Associated Domains on my application but i dont have now which step is needed now for autofill. Im used Swift 3.0. My website input username and password html is;

<input type="text" name="user"  placeholder="Username" autocapitalize="off" autocomplete="off" autocorrect="off"   aria-invalid="false">

<input type="text" name="password"  placeholder="Password" autocapitalize="off" autocomplete="off" autocorrect="off"   aria-invalid="false">

Can you give me an idea to do this? Thanks in advance.

1

There are 1 answers

2
de. On

See the documentation here:
https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element

It boils down to adding certain keywords to autocomplete like this:

<input id="user-text-field" type="email" autocomplete="username"/>
<input id="password-text-field" type="password" autocomplete="current-password"/>