When configured to detect captive portals, NetworkManager prompts the user to log in by opening http://networkcheck.kde.org
A captive portal will redirect the user and once logged in, redirect somewhere else or back to networkcheck.
Currently, it doesn't automatically detect the fact that the user is now logged in and only notices after like 10 minutes.
With this patch, when a new tab is opened pointing to KDE networkcheck, whenever the tab completes a navigation, (after a short delay) NetworkManager is asked to re-check network connectivity to update network connectivity basically immediately once connected.
When user is then redirected back to KDE networkcheck, which just returns "OK\n", the tab is closed to not leave the user sitting at this empty OK page.
Details
Details
- Setup my NM to use networkcheck.kde.org, connected to a wifi with captive portal, clicked "Log in" on the "you need to login" prompt, my browser opened, I agreed to terms, hit "Connect", got redirected to some welcome page
- With this patch the exclamation mark on the icon goes away almost immediately after connecting
- Previously it would stay there pretty much forever
Doesn't work on Firefox because there I get a created event with "about:blank" and then only an updated even with the captive portal URL. I can't detect there that I originally opened a "networkcheck.kde.org" tab.
Diff Detail
Diff Detail
- Repository
- R856 Plasma Browser Integration
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
IMO this should be addressed outside of PBI instead:
- If a captive portal is detected, call CheckConnectivity with a higher frequency (I've never had any issues with this, actually)
- Instead of opening networkcheck.kde.org in the browser when clicking the "Log In" button, open a page which just closes itself