Title: Multiple errors with no real reason
Last modified: October 20, 2021

---

# Multiple errors with no real reason

 *  [krisosterhout](https://wordpress.org/support/users/krisosterhout/)
 * (@krisosterhout)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/)
 * Good Afternoon,
 * I’m having several errors with the plugin since I did an update on it. I’m able
   to get a JSON Web Token from the auth endpoint; however, when I attempt to use
   this for autologin, it’s giving me error 23. When I attempted to test this in
   PostMan, it’s giving me error 11.
 * **WordPress Version:** 5.8.1
    **Plugin Version:** 3.3.1
 * Example URL Call for AutoLogin (please note that my website URL and JWT have 
   been redacted by me due to this forum being public):
    `https://{{MYWEBSITEURL}}/?
   rest_route=/simple-jwt-login/v1/autologin&JWT={{JWT RECEIVED FROM AUTH CALL}}&
   redirectUrl=https%3A%2F%2F{{MYWEBSITEURL}}%2Fcourses%2Fannual-hipaa-training%
   2F`
 * Here are the settings that are currently configured:
 * **General**
    Decryption key source: Plugin Settings JWT Decrypt Algorithm: HS256
   Decryption Key: set with a 32 character string JWT Decryption Key is base64 encoded:
   No (Unchecked) Get JWT Token from: – REQUEST: JWT (ON) – SESSION: Off – COOKIE:
   Off – Header: Authorization (ON) All WordPress endpoints checks for JWT Authentication:
   On (checked)
 * **Login**
    Allow Auto-Login: Yes Auto-Login Requires Auth Code: No JWT Login 
   Settings: Log in by WordPress Username (JWT Parameter Key: username) Redirect
   after Auto-Login: Dashboard Include request parameters used for login link in
   the REDIRECT URL: Yes Allow redirect to a specific URL if `redirectUrl` is present
   in the request: Yes
 * **Authentication**
    Allow Authentication: Yes Authentication Requires Auth Code:
   No
 * **CORS**
    Allow CORS: Yes CORS Headers: All enabled and default values
 * I have uninstalled and reinstalled the plugin and reconfigured it, but it gave
   the same results.
 * Any assistance would be greatly appreciated.
 * Thanks,
    Kris
    -  This topic was modified 4 years, 7 months ago by [krisosterhout](https://wordpress.org/support/users/krisosterhout/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [krisosterhout](https://wordpress.org/support/users/krisosterhout/)
 * (@krisosterhout)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/#post-15070763)
 * Hello,
 * I’m still having the same issue and I can’t find a resolution. Do you have any
   suggestions? Any help would be greatly appreciated.
 * Thanks,
    Kris
 *  Plugin Author [Nicu Micle](https://wordpress.org/support/users/nicu_m/)
 * (@nicu_m)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/#post-15133202)
 * Hello [@krisosterhout](https://wordpress.org/support/users/krisosterhout/),
 * Sorry for my late response.
 * Here you can check the error codes: [https://docs.simplejwtlogin.com/#/?id=error-codes](https://docs.simplejwtlogin.com/#/?id=error-codes)
 * Meanwhile, you can encode your encryption key to base64 ([https://www.base64decode.org/](https://www.base64decode.org/)),
   and use the checkbox “JWT Decryption Key is base64 encoded”.
 * I will investigate this issue, and come back with updates.
 * Best regards,
    Nicu.
 *  Thread Starter [krisosterhout](https://wordpress.org/support/users/krisosterhout/)
 * (@krisosterhout)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/#post-15242150)
 * Hi Nico,
 * I have an update for you. If I turn off the Header authentication option, then
   the REQUEST option works. So, for more info:
 * General Settings
    Get JWT token from 1. Request — ON 2. Session — OFF 3. Cookie—
   OFF 4. Header — OFF
 * However, I need both the Request and the Header options available as I use the
   header for the REST API and the Request option for autologin. Any ideas?
 * Thanks,
    Kris
 *  Thread Starter [krisosterhout](https://wordpress.org/support/users/krisosterhout/)
 * (@krisosterhout)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/#post-15242194)
 * Hi Again Nico,
 * I remembered that this was an issue in the past that I had fixed via changing
   the preg_match regex.
 * I’ve fixed it again with the following change:
 * src/Services/BaseService.php
 * Line 167 – **Original Code**
    `'/^(?:Bearer)?[\s]*(.*)$/mi'`
 * Line 167 – **Changed Code**
    `'/(?:Bearer ?)?(.+)/m'`
 * I am not strong with regex, so it’s difficult for me to analyze what the issue
   is. I’m also not sure why other people aren’t reporting issues with this. I just
   wanted to let you know that this corrected our issue.
 * Thanks,
    Kris

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Multiple errors with no real reason’ is closed to new replies.

 * ![](https://ps.w.org/simple-jwt-login/assets/icon-256x256.png?rev=2106097)
 * [Simple JWT Login – Allows you to use JWT on REST endpoints.](https://wordpress.org/plugins/simple-jwt-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-jwt-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-jwt-login/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-jwt-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-jwt-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-jwt-login/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [krisosterhout](https://wordpress.org/support/users/krisosterhout/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/multiple-errors-with-no-real-reason/#post-15242194)
 * Status: not resolved