[Workaround OK] "Logout" popup blocked .. instead, how to redir to logout page?



  • So if the logout button is blocked by the average AdBlock Plus extension, then I'm wondering if, instead, I can redirect users to the logout page itself?

    But how do I do that?



  • It isn't a button that's being blocked, but the opening of a new tab, windows or popup.
    Also known with this definition : a popup.

    popup control is handled in the users (visitors) browser.
    You have NO control about navigator's settings that a visitor is using on his device.



  • EDIT: Confirmed this method works – use my HTML below, upload it as logout page (as logout.html, the 'legit way' in admin panel), and set the redirect AFTER login to "logout.html". This seems to be a legit workaround for now. I can also confirm the logout button still disconnects you normally. :)

    @Gertjan:

    It isn't a button that's being blocked, but the opening of a new tab, windows or popup.
    Also known with this definition : a popup.

    popup control is handled in the users (visitors) browser.
    You have NO control about navigator's settings that a visitor is using on his device.

    Why are you even on this forum if you believe we have no control? That's what PFS is about mate :) In the time you said this, I logged into /etc/captiveportal-logout-something , took out the js that made it a popup, and suddenly works fine, just an ugly window that can be edited.

    Still a lot of work to do, but 100% far from "NO control".

    If anyone is interested, use this template (still needs work, but it's a start):

    
    	<title>Logout</title>
    
    		**Click the button below to disconnect**
    
    

    I'm hoping to use redirect page to simply redirect to logout page…

    ALTERNATELY,

    If anyone knows the exact PHP script that logs a user out, that'd be fantastic... something like

    http://pfsip:8000/?logouturl=&sessionid=&cpzone=&logout=

    If we could figure this out, could make a simple script to even embed/replace the login page. When logged in, simply replace the submit button with the logout button using jquery



  • @dylanh724:

    Why are you even on this forum if you believe we have no control? That's what PFS is about mate :) In the time you said this, I logged into /etc/captiveportal-logout-something , took out the js that made it a popup, and suddenly works fine, just an ugly window that can be edited.

    Because its a free world.
    You have the right to be wrong. Me also  ;)

    Anyway, your new approach isn't a popup solution (as implemented by pfSense) but you use the Redirect - which is, I guess, a better solution.
    Just one question : why isn't it implemented already ?

    @dylanh724:

    http://pfsip:8000/?logouturl=&sessionid=&cpzone=&logout=

    Now, that's why I'm here  ;D
    Have a look at this https://forum.pfsense.org/index.php?topic=77143.0 - read all pages (more then 6) and you will find out how to access this needed $sessionid so you can create an URL that will log you out.



  • @Gertjan:

    @dylanh724:

    Why are you even on this forum if you believe we have no control? That's what PFS is about mate :) In the time you said this, I logged into /etc/captiveportal-logout-something , took out the js that made it a popup, and suddenly works fine, just an ugly window that can be edited.

    Because its a free world.
    You have the right to be wrong. Me also  ;)

    Anyway, your new approach isn't a popup solution (as implemented by pfSense) but you use the Redirect - which is, I guess, a better solution.
    Just one question : why isn't it implemented already ?

    @dylanh724:

    http://pfsip:8000/?logouturl=&sessionid=&cpzone=&logout=

    Now, that's why I'm here  ;D
    Have a look at this https://forum.pfsense.org/index.php?topic=77143.0 - read all pages (more then 6) and you will find out how to access this needed $sessionid so you can create an URL that will log you out.

    Oooooh… thank you free world :) I'll take a look

    "Why isn't this already implemented as a feature?"
    Good question! This should really be the default feature with popup blockers being almost default these days.


Log in to reply