• Resolved oinkmeup

    (@oinkmeup)


    Hey,

    Thanks for the great plugin.
    Unfortunately, I have a bug. When I login, I get redirected to the login page. If then I click on “back to website”, it appears I’m logged in and I can browse the site.

    Any clue?

    Thanks!

    • This topic was modified 3 years, 10 months ago by oinkmeup.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter oinkmeup

    (@oinkmeup)

    Found the answer : it was redirecting to http and not https.

    I also had this problem, and found that if the link the user was trying to get to had http, the login page would loop, but if it was https, it would work fine. However, I find if the user types in the website address without any http or https (for example acme.com instead of https://www.acme.com) then it would try and redirect to http, which is a problem. I have a feeling this is a problem with the settings in the web hosting environment? Any pointers on how to avoid this problem?

    Plugin Author Kevin Vess

    (@kevinvess)

    @jennifersuess

    This is an issue with your web hosting. You need to ensure your web hosting is configured to always redirect visitors to the preferred HTTP connection type (hopefully HTTPS) before the WordPress site loads.

    Force Login sends visitors to the login screen based on the URL configured in WordPress General Settings. So make sure your General settings are configured with the preferred HTTP connection type as well.

    Thanks for using Force Login!

    I had to manually edit the v_forcelogin method in wp-force-login.php, so schema is always set to https. Even when the user types the https:// url of our WP webpage, the url still has http in redirect_to parameter and url would look like this: https://{our-webpage}/wp-login.php?redirect_to=http%3A%2F%2F{our-webpage}

    We are using WordPress 5.7 with HelpGuru theme (v1.7.1) and LoginPress plugin (v1.5.1).

    • This reply was modified 3 years, 7 months ago by yurislav.
    Plugin Author Kevin Vess

    (@kevinvess)

    @yurislav

    The redirect_to URL schema in Force Login is based on URL schema the user visited.

    You shouldn’t need to edit the plugin code if your web server is configured to redirect HTTP visits to the HTTPS url before the site code runs.

    However, if you need to enforce the HTTPS schema on the redirect URL, I recommend you use the v_forcelogin_redirect filter to do this.

    Thanks for using Force Login!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Looping on login page’ is closed to new replies.