vlaci / openconnect-sso

Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication to Cisco SSL-VPNs
GNU General Public License v3.0
280 stars 119 forks source link

Browser won't stop refreshing while trying to type authentication code #72

Open eoto88 opened 2 years ago

eoto88 commented 2 years ago

After the first login, the page to enter the authentication code appears but won't stop refreshing every second and logging this in the console:

js: Uncaught ReferenceError: Login is not defined

I barely have time to enter the first digit that the page refresh and I lose what I entered.

I use Ubuntu 20.04.3 LTS and openconnect-sso 0.7.3

JeeMo commented 2 years ago

I am also having this issue. I am on Ubuntu 20.04.4 and openconnect-sso 0.7.3

JeeMo commented 4 months ago

So, I know this is WAY after the fact, but I think I found a fix. When I removed the username from both the --user option AND in the ~/.config/openconnect-sso/config.toml, this issue stopped and I was able to log-in. It is possible this is due to the VPN server setup rather than openconnect-sso since AnyConnect doesn't allow pre-populating the username either.

JeeMo commented 4 months ago

I also followed this issue: https://github.com/vlaci/openconnect-sso/issues/114 but had to manually remove everything first and update python, pip, pipx. Also updated PyQt from 5 to 6. That said, the browser issue described above continued to happen until I removed the username. ~good luck!

kokizzu commented 2 months ago

yeah, removing --user works, it wont loop anymore

exaexa commented 2 months ago

Hello, just reporting that I've got the same issue, thanks for the hint with removing the username (works for me)!

exaexa commented 2 months ago

Anyway, looking at the issue: the username was actually autofilling correctly for me to the web form. Might be the case that the autofill rules are not getting triggered correctly in my form? (mine is from Azure :disappointed: )

the config:

[auto_fill_rules]
[[auto_fill_rules."https://*"]]
selector = "div[id=passwordError]"
action = "stop"

[[auto_fill_rules."https://*"]]
selector = "input[type=email]"
fill = "username"

[[auto_fill_rules."https://*"]]
selector = "input[name=passwd]"
fill = "password"

[[auto_fill_rules."https://*"]]
selector = "input[data-report-event=Signin_Submit]"
action = "click"

[[auto_fill_rules."https://*"]]
selector = "div[data-value=PhoneAppOTP]"
action = "click"

[[auto_fill_rules."https://*"]]
selector = "a[id=signInAnotherWay]"
action = "click"

[[auto_fill_rules."https://*"]]
selector = "input[id=idTxtBx_SAOTCC_OTC]"
fill = "totp"