WordPress JSON Web Token Authentication allows you to do REST API authentication via token. It is a simple, non-complex, and easy to use. This plugin probably is the most convenient way to do JWT Authentication in WordPress. Support & question: WordPress support forum Reporting plugin’s bug: GitHub
PricingFree downloadThe WordPress.org download is free. Pro versions, add-ons or external services may cost extra.
CompatibilityRequires WordPress 5.2 and PHP 7.2.
SourceWordPress plugins · Nov 30, 2026
01 / Source details
Aboutthistool.
WordPress JSON Web Token Authentication allows you to do REST API authentication via token. It is a simple, non-complex, and easy to use. This plugin probably is the most convenient way to do JWT Authentication in WordPress.
Support & question: WordPress support forum
Reporting plugin’s bug: GitHub issues tracker
Discord channel also available for faster response.
Upgrading to v3
When updating from v2 to v3, familiarise yourself with its changes to ensure that your site continues to work as expected:
Default JWT access token expiry time has been reduced from 7 days to 10 minutes.
On expiry of a JWT, clients need to retrieve a new access token using the refresh token as described here .
To retain the 7 day expiry time, use the hook jwt_auth_expire .
Removed Whitelist
Key changes:
You no longer need to whitelist REST paths from other plugins with the hook jwt_auth_whitelist . You can remove the hook.
Instead, custom REST API routes should have access requirements specified with the permissions callback when it is registered.
This means that if a route requires authentication, any authentication method can be used and this should reduce conflicts between this and other plugins. See this discussion for further information.
Enable PHP HTTP Authorization Header
Shared Hosts
Most shared hosts have disabled the HTTP Authorization Header by default.
To enable this option you’ll need to edit your .htaccess file by adding the following:
RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
WPEngine
To enable this option you’ll need to edit your .htaccess file by adding the following (see this issue ):
To generate token, submit a POST request to this endpoint. With username and password as the parameters.
It will validates the user credentials, and returns success response including a token if the authentication is correct or returns an error response if the authentication is failed.
You can use the optional parameter device with the device identifier to let user manage the device access in your profile. If this parameter is empty, it is ignored.
Sample of success response when trying to generate token:
Sample of error response when trying to generate token:
{ "success": false, "statusCode": 403, "code": "invalid_username", "message": "Unknown username. Try again or check your email address.", "data": [] }
Once you get the token, you must store it somewhere in your application. It can be: – using cookie – or using localstorage – or using a wrapper like localForage or PouchDB – or using local database like SQLite or Hive – or your choice based on app you develop 😉
Then you should pass this token as Bearer Authentication header to every API call. The header format is:
The jwt-auth will intercept every call to the server and will look for the authorization header, if the authorization header is present, it will try to decode the token and will set the user according with the data stored in it.
If the token is valid, the API call flow will continue as always.
Validating Token
You likely don’t need to validate the token your self. The plugin handle it for you like explained above.
But if you want to test or validate the token manually, then send a POST request to this endpoint (don’t forget to set your Bearer Authorization header):
For security reasons, third-party applications that are integrating with your authentication server will not store the user’s username and password. Instead they will store the refresh token in a user-specific storage that is only accessible for the user. The refresh token can be used to re-authenticate as the same user and generate a new access token.
When authenticating with username and password as the parameters to /wp-json/jwt-auth/v1/token , a refresh token is sent as a cookie in the response.
/wp-json/jwt-auth/v1/token
To generate new access token using the refresh token, submit a POST request to the token endpoint together with the refresh_token cookie.
Use the optional parameter device with the device identifier to associate the token with that device.
If the refresh token is valid, then you receive a new access token in the response.
By default, each access token expires after 10 minutes.
/wp-json/jwt-auth/v1/token/refresh
To generate new refresh token using the refresh token, submit a POST request to the token refresh endpoint together with the refresh_token cookie.
Use the optional parameter device with the device identifier to associate the refresh token with that device.
If the refresh token is valid, then you receive a new refresh token as a cookie in the response.
By default, each refresh token expires after 30 days.
Refresh Token Rotation
Whenever you are authenticating afresh or refreshing the refresh token, only the last issued refresh token remains valid. All previously issued refresh tokens can no longer be used.
This means that a refresh token cannot be shared. To allow multiple devices to authenticate in parallel without losing access after another device re-authenticated, use the parameter device with the device identifier to associate the refresh token only with that device.
All refresh tokens of a user are revoked when their password is changed or reset. Removing a device from the user’s connected devices revokes the refresh token of that device; the app must then log in with username and password again.
FinderPress Media Auditor helps site administrators scan for broken images, missing Media Library files, unreachable media URLs, and other media issues across WordPress content. Use it to audit images, video, audio, PDFs, featured images, and attachment files without sending scan data to an external
The Accepted Payment Methods plugin is a straightforward, lightweight solution that enhances your website by displaying visually appealing icons of the payment methods you accept. This plugin is ideal for a variety of websites, including e-commerce platforms, service-oriented websites, and informati