Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved Captive Portal
    5 Posts 2 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dylanh724
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        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.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • D
          dylanh724
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            @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.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • D
              dylanh724
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.