Hi Nicu,
Thanks for your reply, and for taking the time to test – sorry for the delay with my reply.
I have confirmed that this occurs when the following conditions are met:
– Fresh Installation of WordPress, using LocalWP
– Using theme: Twenty Twenty-Three
– Attempting ngrok tunnel access, using a LocalWP “Live Link” (which requires Basic Auth)
Installed Plugins:
– Simple-JWT-Login (ver 3.4.8)
– Woocommerce (7.1.0)
Here is a video repro of the steps I took, detailed below…
https://drive.google.com/file/d/1mGUqFulbJUTOuFcxcUzEXAWYCh5NXgAT/view?usp=sharing
After I installed the settings, shown in the video, into the JWT plugin, the wp-admin became unresponsive, with the following error shown at the end of the output:
{"success":false,"data":{"message":"Wrong number of segments","errorCode":2,"type":"simple-jwt-login-middleware"}}
This is the problem we have been having on our live site, as well, whenever I try to access any query like get_posts, etc, in the front or backend.
Here are the settings I used in JWT (as exported by the WP-CFM plugin):
{
"simple_jwt_login_settings": "{\"allow_authentication\":\"1\",\"jwt_payload\":[\"exp\",\"email\",\"id\",\"site\",\"username\"],\"jwt_auth_ttl\":\"60\",\"jwt_auth_refresh_ttl\":\"20160\",\"auth_ip\":\"\",\"auth_requires_auth_code\":false,\"cors\":{\"enabled\":0,\"allow_origin_enabled\":false,\"allow_origin\":\"*\",\"allow_methods_enabled\":false,\"allow_methods\":\"GET, POST, PUT, DELETE, OPTIONS, HEAD\",\"allow_headers_enabled\":false,\"allow_headers\":\"*\"},\"allow_delete\":false,\"require_delete_auth\":true,\"delete_ip\":\"\",\"delete_user_by\":0,\"jwt_delete_by_parameter\":\"\",\"route_namespace\":\"simple-jwt-login\\\/v1\\\/\",\"jwt_algorithm\":\"HS256\",\"decryption_source\":\"0\",\"decryption_key\":\"oipwejflsdj;flhso8fou-240ifru9yw0epirhos;ea[ofi;jewlf\",\"decryption_key_base64\":false,\"decryption_key_public\":\"\",\"decryption_key_private\":\"\",\"request_jwt_url\":1,\"request_jwt_cookie\":0,\"request_jwt_header\":1,\"request_jwt_session\":0,\"api_middleware\":{\"enabled\":true},\"request_keys\":{\"url\":\"JWT\",\"session\":\"simple-jwt-login-token\",\"cookie\":\"simple-jwt-login-token\",\"header\":\"Authorization\"},\"enabled_hooks\":[],\"jwt_login_by\":0,\"jwt_login_by_parameter\":\"email\",\"allow_autologin\":true,\"redirect\":10,\"redirect_url\":\"\",\"login_fail_redirect\":\"\",\"require_login_auth\":false,\"include_login_request_parameters\":true,\"allow_usage_redirect_parameter\":true,\"login_ip\":\"\",\"allow_register\":true,\"new_user_profile\":\"customer\",\"register_ip\":\"\",\"register_domain\":\"\",\"require_register_auth\":false,\"random_password\":false,\"register_force_login\":true,\"register_jwt\":true,\"allowed_user_meta\":\"\",\"allow_reset_password\":true,\"reset_password_requires_auth_code\":false,\"jwt_reset_password_flow\":2,\"jwt_email_subject\":\"test\",\"jwt_reset_password_email_body\":\"SGVyZSBpdCBpcyB7e0NPREV9fQ==\",\"jwt_email_type\":0,\"reset_password_jwt\":true,\"protect_endpoints\":{\"enabled\":0,\"action\":2,\"protect\":[\"\\\/wp\\\/v2\\\/users\",\"\"],\"whitelist\":[\"\",\"\"]},\"auth_codes\":[{\"code\":\"12345678910\",\"role\":\"customer\",\"expiration_date\":\"2030-12-23 23:34:59\"}],\"auth_code_key\":\"AUTH_KEY\"}",
".label": "JWT"
}
I had not set any settings for Woocommerce. After setting those settings in JWT, when I tried to access /wp-admin – I get the error noted
Can you please review and let me know if you can reproduce? This is a bit of a thorn in my side right now, and I would like to work with you to fix it, if possible.
Thanks!
Terrance