Support » Plugin: JWT Authentication for WP REST API » Token keeps getting invalid

  • Hello JWT Auth Plugin,

    I’m using the JWT_AUTH_EXPIRE hook in order to ovverdie the default expiry timeframe and I’m calling the hook in wp-config.php but it seems every time this file gets opened/modified all the created tokens will be invalid?

    Is it better that we call the hook inside the theme “functions.php”?


    Best regards,

Viewing 1 replies (of 1 total)
  • Hello I have the same situation here. I tried doing a 10 year expiration and looks like it didn’t work at all. On my wp-config.php I put define('JWT_AUTH_EXPIRE', time() + (YEAR_IN_SECONDS * 10));, looks like it is ignoring it because I had to re do my tokes a couple days ago…

    Right now I don’t know if the new tokes are going to expire soon or not and I can’t be re creating tokes all the time, so my questions are:

    1. Is there a way to check when the token expires so I can prove is in 10 years?
      • Where is JWT_AUTH_EXPIRE supposed to live in the code? there are no examples or documentation about this
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.