Password manager and external form filling

Hi guys,

I’ve been working on a simple app on my own that runs in production right now but I’m having difficulty to use my password manager (LastPass) with it. I think I understand what’s going though but I don’t know how I could handle it.

When I open the login page I see my credentials filled but since they were not updated through the Elm runtime, both values are empty in my model thus, my submit button is disabled. If I either edit the password or the email, the other value disappear (because of a rerender).

I do get that it is because only the DOM gets updated and not the model, but I don’t get how this could be handled. Password managers are getting more frequent and I’m sure I won’t be the only one facing this.

Thank you for your help!

1 Like

Easiest solution would probably be to configure password manager to simulate key presses when filling fields, so you can detect changes with onInput event, just like when entering credentials manually. (I havn’t used LastPass so I don’t know if it offers such an option.)

Otherwise my guess would be that the change can’t be detected using Elm, because Elm doesn’t expect DOM to be modified externally, so a solution would require e.g. custom element. Custom element could check periodically if value has changed, and send event when value has changed.

I actually mised a detail, it does work on Firefox desktop, for instance. It’s on Firefox mobile that it doesn’t work, it does on Safari tho.

The custom element idea might help to make it work on all platform. Do you have an example or documentation where I can have an idea on how this could work?

It sounds like LastPass has been deprecated on Firefox mobile for a couple of years now, perhaps they found issues with the Firefox auto-fill API like this that they did not want to support? A quick search around online suggests that there have been a number of problems over the past decade with auto-complete not behaving as expected, especially for fields auto-populated on load. There are documented issues with password autofill especially not triggering input or change events.

I’m wondering whether you could write a port that would trigger ‘input’ or ‘change’ events on all inputs?

This is not the extension you are talking about, I’m on iOS. It replaces the iCloud keychain on iOS (it’s the exact same prompt on all app/website).

Can show me some of those documented issues you are talking about?

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.