Use AutoFill with WKWebView on Microsoft login URL

67 Views Asked by At

I access the Microsoft login URL https://myapplications.microsoft.com in my app. I noticed, that AutoFill is not provided by WKWebView when it comes to pages where JavaScript is used and credentials are spread across 2 pages. However from Safari, AutoFill works fine with the same URL. Also, more simple (than Microsoft login) pages trigger the WKWebView AutoFill heuristics correctly.

Domain entitlements are setup in the app. A Text Input View in the same app saves credentials to the iCloud keychain and AutoFill works as expected.

After digging a lot, I didn't find a way to use AutoFill in conjunction with the URL above.
Password AutoFill
Enabling Password AutoFill on an HTML Input Element

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

This snippet should be inside the URL content, but if it's not your own URL, you have no control on its content.

Is there any possibility to enable AutoFill for the URL above when using WKWebview?

0

There are 0 best solutions below