javascript - Prevent Captive Portal auto-close after authentication (Android) -
so simple idea have radius server setup allow users authenticate our ruckus controller via user credentials. on authentication user should redirected page allows them manage mac authenticated devices.
on have tested far, including "older" android devices seems no issue , things run should. lollipop (5.0+) versions of android captive portal has changed quite bit, , part of change automatically close captive portal launches when join network. because want them redirected mac device management page after authentication can add device logged in , avoid having log in again, bad.
what have tried:
detecting if browser being launched in mobile device , popping alert in onbeforeunload attempts keep browser open.
opening new browser window, pointing redirection url, when successful authentication detected (essentially managing redirect ourselves).
performing option 2, , option 1 on redirected url
what won't work:
asking users disable captive portal option on device. not trying point general users advanced controls.
creating open network access mac manager, must behind authentication.
solution now:
we unhappy solution, asking users authenticate network , open browser , go basic login portal page (non-network authentication) users use manually add devices can't connect (like printers, gaming devices, etc.). though works, pain users have login, open browser, manually enter url, , login again.
this isn't problem people haven't run into, see here, haven't been able find solution has run problem. there way of utilizing javascript or keep browser open in situation. if not, have better ideas managing things?
we have managed keep uam browser / captive portal browser open on lollipop adding firewall rules blocking :
- clients3.google.com
- clients1.google.com ,
- android.clients.google.com
- connectivitycheck.android.com
- connectivitycheck.gstatic.com
thus after user authenticated uam / captive browser stays open.
you can keep uam open long need, can close invoking reverse proxied 204 redirect google's connectivity page.
Thanks for your post!
ReplyDeleteHow can we make the reverse proxied 204 redirect you mentioned?
Thanks!