• Hello,
    I’m working in an iOS app that gets the info from a WP via the WP API REST v2 (2.0-beta 11 version).
    I’ve installed your plugin to authenticate and I can get the token and validate it without problem, but when I try accessing any other content with the token, I get the next message (from Postman):
    {
    “code”: “jwt_auth_bad_config”,
    “message”: “JWT is not configurated properly, please contact the admin”,
    “data”: {
    “status”: 403
    }
    }
    This is my configuration:

    WordPress v 4.4.1 installed in remote server
    Installed WordPress REST API (2.0-beta 11 version) and activated
    Enabled HTTP Authorization Header option in my .htaccess which located in the main directory of WordPress
    Configurate the Secret Key in my wp-config.php which located in the main directory of WordPress
    Configurate CORs Support

    Maybe problems with .htaccess file?
    Any clue?

    Thank you

    https://www.ads-software.com/plugins/jwt-authentication-for-wp-rest-api/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter acasanova

    (@acasanova)

    Looking at the plugin code I think the problem is related to the JWT_AUTH_SECRET_KEY variable.
    When the token is created the variable is being accessed without problem, but when the validate_token function is called it seems not to be there.

    Thank you.

    Thread Starter acasanova

    (@acasanova)

    The problem was where I had defined JWT_AUTH_SECRET_KEY variable in the wp-config.php file.
    Setting the variable in the correct part of the file makes the plugin work properly.

    Thank you.

    Hello all,

    I’m having the same issue when I ask for the token the first time:

    {
    “code”: “jwt_auth_bad_config”,
    “message”: “JWT is not configurated properly, please contact the admin”,
    “data”: {
    “status”: 403
    }
    }

    Could you put where did you put the JWT_AUTH_sECRET_KEY in the wp-config.php?

    I’m working with WP 4.6.1

    Thank you in advance XD

    I change the position of below lines before ” define(‘WP_DEBUG’, true); ” Its working fine now for this error.

    define(‘JWT_AUTH_SECRET_KEY’, ‘JWT is not configurated properly’);
    define(‘JWT_AUTH_CORS_ENABLE’, true);

    @gnanasekaran, I had the same issue using postman and was not able to find out the issues.
    As per your advice, changed the position of the JWT in wp-config.php and it works.
    Thanks for sharing.

    Wonder if anyone can explain the reason for this?

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