WordPress.org

Forums

WordPress HTTPS (SSL)
Can't logout. Need help figuring out why. (3 posts)

  1. davestein1
    Member
    Posted 1 year ago #

    Great plugin, thank you very much.

    Only problem is this: My logout link works, but it doesn't function.

    I remain logged in. I paste in an admin link and I can still edit and navigate just fine.

    How do I solve this?

    I am running a newly created WP site, 2014 theme,
    using Shared SSL, and
    no other login or ssl plugins are running.

    Very basic!

    My settings for Shared SSL:
    Http:Fred.com/test1
    https://fred.pairsite.com/test1

    For the plugin settings I have:
    SSL HOST fred.pairsite.com/test1
    Force SSL Admin (only in plugin, not in WP-config)

    I would love to help debug this.

    Thanks!

    https://wordpress.org/plugins/wordpress-https/

  2. davestein1
    Member
    Posted 1 year ago #

    Well, hello to anyone interested in why you are not able to log out.

    I found a workaround!

    The problem seems to be that wp-login.php logout function is not working. I do not know why.
    The workaround is to call login instead.

    So at line 475 of wp-login.php I changed the logout code very slightly and just removed the URL argument:
    ?loggedout=true

    Now it just simply redirects to wp-login.php. No arguments. Works!

    Looking forward to the real fix.

    In the meantime, I hope this helps.

    -Dave

  3. davestein1
    Member
    Posted 1 year ago #

    CORRECTION.

    wp-login.php was fine. No editing required.

    The problem (logout doesn't work) and fix seems to be this:

    Problem:
    In Setting -> General, the WordPress Address URL is used as the cookie domain.
    If I set that to the non-secure domain, then a logout from within the secure area fails.
    Iow, with a WP URL of the secure fred.pairsite.com the logout function works.
    But with the unsecure fred.com, logout does not work.

    Fix:
    The fix is to make WP's cookie domain use the secure URL.
    define('COOKIE_DOMAIN', 'fred.pairsite.com' );

    It also makes it a 3rd party cookie, relative to the other domain, so perhaps it might be rejected.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress HTTPS (SSL)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic