openconnect-sso
openconnect-sso copied to clipboard
Browser won't stop refreshing while trying to type authentication code
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
I am also having this issue. I am on Ubuntu 20.04.4 and openconnect-sso 0.7.3
I am getting this response: js: The Content Security Policy 'default-src 'self' cbsi.okta.com *.oktacdn.com; connect-src 'self' cbsi.okta.com cbsi-admin.okta.com *.oktacdn.com *.mixpanel.com *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com cbsi.kerberos.okta.com https://oinmanager.okta.com data:; script-src 'unsafe-inline' 'unsafe-eval' 'self' cbsi.okta.com *.oktacdn.com; style-src 'unsafe-inline' 'self' cbsi.okta.com *.oktacdn.com app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; frame-src 'self' cbsi.okta.com cbsi-admin.okta.com login.okta.com api-f05ee48d.duosecurity.com; img-src 'self' cbsi.okta.com *.oktacdn.com *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com data: blob:; font-src 'self' cbsi.okta.com data: *.oktacdn.com fonts.gstatic.com' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no effect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header.
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.
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!
yeah, removing --user works, it wont loop anymore
Hello, just reporting that I've got the same issue, thanks for the hint with removing the username (works for me)!
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"