Username and other form values are not saved after successful login
I created a new username/password authorized openconnect connection, checked the "Save password" box and signed in. The VPN connection works fine. Next time I open the connection, the password field is filled in, but the username field is left blank, so I have to type it in again.
This is on Gnome 3.34.2 on Arch linux, with networkmanager-openconnect version 1.2.6-1
I did some debugging of this issue by manually building the auth-dialog from this repository, and launched it with the same arguments as done my network-manager-applet. When doing this, it outputs the form entries from the signin page, including the username, in this format on stdout (secrets manually redacted).
form:main:username
user.name
form:main:group_list
vpn.meniga.is
gateway
X.X.X.X:443
save_passwords
yes
cookie
YYY
save_s
yes
gwcert
pin-sha256:XXX
lasthost
vpn.XX.yy
Reading auth-dialog.c, it seems like this is then intended to be saved back to the connection profile for the next time. However, this does not happen. Instead the connection profile has only the last entry, "lasthost" in it.
My guess is that something goes wrong in the interaction between network-manager-applet and this dialog, but I couldn't quite figure out what.