Hi Nico,
Thanks for bringing this issue to our attention. I will look into it now and try to reproduce it, so your full environment details will definitely help me narrow it down.
To help me further, could you provide the following information:
- What happens exactly when you try to log in? For example: an error message under the form (please paste the exact text), the widget never finishing, or the page just reloading.
- Did login work with an earlier OpenPorte version (1.29.x or before), or is 1.30.0 the first version you’ve used on this site?
- Is it the standardÂ
wp-login.php page, or a custom login URL or 2FA step (for example from Really Simple Security)?
- LiteSpeed Cache:Â are any JavaScript optimisations turned on (Combine, Defer or Delay JS)? If you can, try once with them off, or with the login page excluded from them.
- Browser console:Â if you can, open the developer tools (F12), try to log in, and send me any red errors from the Console tab.
Please don’t post passwords or admin access here. That’s against the forum rules and I don’t need it.
Until then, you can temporarily turn off protection for the login form in the OpenPorte settings and keep other protection on everywhere else you use it.
Thanks for your patience. I’ll get back to you soon.
Thread Starter
Nico
(@gooloode)
Hi, i can answer a couple of those. 🙂
- The Error Message stated “Invalid Login Credentials”. Using the Same ones (Password Manager) without the Plugin being active does not cause this issue; only with OpenPorte installed
- I used ALTCHA before, so i just switched a couple days ago to OpenPorte. As this was the first Login after installing, im not sure If this issue was previously there.
- Its the very normal Login Flow through wp-login.php with no alterations.
- LiteSpeed is set-up minimally; Defer is off
OK, after a few test already, there might be an explanation of the issue. The plugin LiteSpeed Cache is caching REST requests. It is also ignoring the instructions OpenPorte sends Cache-Control: no-cache, no-store. So the challenge is being cached, meaning each subsequent login will resolve the same challenge until the cache expires. Since OpenPorte v1.29.0 a replay limit is implemented (default to 5 uses), which means OpenPorte will start refusing challenges after the 6th login attempt.
With the help of Claude, I quickly went through workaround possibilities and there are two (so use one of the two):
- In OpenPorte settings, set Self-hosted transport to Ajax. That’s the admin-ajax route added in v1.30.0, which LiteSpeed doesn’t cache by default.
- In LiteSpeed Cache, addÂ
/wp-json/openporte/ to Cache → Excludes → Do Not Cache URIs, then click Purge All.
Either way you need to purge LiteSpeed’s cache once, because the expired challenge stays cached until then.
I’m still building a bench with this setup to verify the static analysis and workarounds. And LightSpeed can skip caching when DONOTCACHEPAGE is defined or when a plugin calls do_action('litespeed_control_set_nocache', …). I am considering implementing it anyway, so no workaround is needed.
One more thing:
About the “Invalid login details” message: that comes from Really Simple Security. Its “prevent login information leakage” feature replaces every login error with that generic text, including OpenPorte’s CAPTCHA error. So the password was fine; it was the expired challenge that was refused. Once the cache is purged, please test in a private window.
Thread Starter
Nico
(@gooloode)
Thank you so much, the AJAX Setting fixed it. I set it to AJAX, cleared the cache, tried again, and now everything works. I kept away from LiteSpeed, as you mentioned, that this will be in a future release. However, even without those, it works now. 🙂
Hi Nico,
Great to hear it works now, and thanks for testing so quickly!
A few notes so it stays that way:
- Why Ajax works: LiteSpeed Cache doesn’t cacheÂ
admin-ajax.php requests by default, so each visitor gets a fresh challenge. The one exception is LiteSpeed Cache’s AJAX Cache TTL setting (Cache → Advanced): if openporte_challenge is ever added there, the challenge gets cached again and the same lockout comes back. As long as you don’t add it, you’re fine.
- After changing any OpenPorte setting, purge LiteSpeed’s cache. Your login page is cached by LiteSpeed as well, so a cached page keeps the old settings until it’s purged. Switching to Ajax only took effect because you cleared the cache.
- The fix is ready for the next release (1.30.1). OpenPorte will tell LiteSpeed Cache directly not to cache challenges, for both REST and Ajax, so it no longer depends on settings. After updating, purge LiteSpeed’s cache once. Then you can stay on Ajax or switch back to REST; both will work. If you switch, purge again. It was validated on our local bench which we upgraded to support OpenLiteSpeed server and the LiteSpeed Cache plugin.
Thanks again for the report and the detailed answers; you’re credited in the 1.30.1 changelog.
Edit: sorry, I saw afterwards that you marked the thread as solved. So I edited my message above to reflect that.
-
This reply was modified 1 month ago by
J-C Berthon.
-
This reply was modified 1 month ago by
J-C Berthon. Reason: Correction: the reporter had already marked the thread as resolved
Hey, just wanted to let you know that release v1.30.1 contains a fix for the LiteSpeed Cache issue you reported. It has been published and is now under review by the WordPress Plugin team. It should be visible to sites in about 6h.