grase-www-portal
grase-www-portal copied to clipboard
Detect Mobile "UAM" window and autoredirect
When a mobile device opens a login window (like Android does with it's generate_204), it's waiting for that 204 to be issued to know to close the window. Status windows don't make much sense on these devices either.
We can detect based on the userurl, and the user agent if this is a UAM window, and then automatically redirect after successful login. This does mean the user won't see their limits. We may need to make this feature optional (#130)
if (userurl.match(/(generate_204)/)) {
window.location.href = userurl;
}