openconnect-sso icon indicating copy to clipboard operation
openconnect-sso copied to clipboard

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

Open eoto88 opened this issue 3 years ago • 6 comments

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

eoto88 avatar Dec 21 '21 16:12 eoto88

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

JeeMo avatar Mar 14 '22 19:03 JeeMo

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.

JeeMo avatar Mar 16 '22 15:03 JeeMo

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 avatar Feb 26 '24 22:02 JeeMo

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!

JeeMo avatar Feb 26 '24 22:02 JeeMo

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

kokizzu avatar Apr 25 '24 10:04 kokizzu

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

exaexa avatar May 03 '24 06:05 exaexa

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"

exaexa avatar May 03 '24 06:05 exaexa