This plugin seamlessly extends the WP REST API, enabling robust and secure authentication using JSON Web Tokens (JWT). It provides a straightforward way to authenticate users via the REST API, returning a standard JWT upon successful login. Key features of this free version include: Standard JWT Aut
PricingFree downloadThe WordPress.org download is free. Pro versions, add-ons or external services may cost extra.
CompatibilityRequires WordPress 4.2 and PHP 7.4.0.
SourceWordPress plugins · Nov 28, 2026
01 / Source details
Aboutthistool.
This plugin seamlessly extends the WP REST API, enabling robust and secure authentication using JSON Web Tokens (JWT). It provides a straightforward way to authenticate users via the REST API, returning a standard JWT upon successful login.
Key features of this free version include:
Standard JWT Authentication: Implements the industry-standard RFC 7519 for secure claims representation.
Simple Endpoints: Offers clear /token and /token/validate endpoints for generating and validating tokens.
Configurable Secret Key: Define your unique secret key via wp-config.php for secure token signing.
Optional CORS Support: Easily enable Cross-Origin Resource Sharing support via a wp-config.php constant.
JSON Web Tokens are an open, industry standard method for representing claims securely between two parties.
For users requiring more advanced capabilities such as multiple signing algorithms (RS256, ES256), token refresh/revocation, UI-based configuration, or priority support, consider checking out JWT Authentication PRO .
Support and Requests: Please use GitHub Issues . For priority support, consider upgrading to PRO .
REQUIREMENTS
WP REST API V2
This plugin was conceived to extend the WP REST API V2 plugin features and, of course, was built on top of it.
So, to use the wp-api-jwt-auth you need to install and activate WP REST API .
PHP
Minimum PHP version: 7.4.0
PHP HTTP Authorization Header Enable
Most shared hosting providers 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
For WPEngine hosting, you’ll need to edit your .htaccess file by adding the following:
You can generate a secure key from: https://api.wordpress.org/secret-key/1.1/salt/
Looking for easier configuration? JWT Authentication PRO allows you to manage all settings through a simple admin UI.
Configure CORS Support
The wp-api-jwt-auth plugin has the option to activate CORS support.
To enable CORS Support, edit your wp-config.php file and add a new constant called JWT_AUTH_CORS_ENABLE :
define('JWT_AUTH_CORS_ENABLE', true);
Finally, activate the plugin within your wp-admin.
Namespace and Endpoints
When the plugin is activated, a new namespace is added:
/jwt-auth/v1
Also, two new endpoints are added to this namespace:
Endpoint | HTTP Verb /wp-json/jwt-auth/v1/token | POST /wp-json/jwt-auth/v1/token/validate | POST
Need more functionality? JWT Authentication PRO includes additional endpoints for token refresh and revocation.
USAGE
/wp-json/jwt-auth/v1/token
This is the entry point for JWT Authentication.
It validates the user credentials, username and password , and returns a token to use in future requests to the API if the authentication is correct, or an error if authentication fails.
Once you get the token, you must store it somewhere in your application, e.g., in a cookie or using localStorage .
From this point, you should pass this token with every API call.
Sample Call Using The Authorization Header With AngularJS
app.config(function($httpProvider) { $httpProvider.interceptors.push(['$q', '$location', '$cookies', function($q, $location, $cookies) { return { 'request': function(config) { config.headers = config.headers || {}; // Assume that you store the token in a cookie var globals = $cookies.getObject('globals') || {}; // If the cookie has the CurrentUser and the token // add the Authorization header in each request if (globals.currentUser && globals.currentUser.token) { config.headers.Authorization = 'Bearer ' + globals.currentUser.token; } return config; } }; }]); });
The wp-api-jwt-auth plugin 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 to the data stored in it.
If the token is valid, the API call flow will continue as normal.
Sample Headers
POST /resource HTTP/1.1 Host: server.example.com Authorization: Bearer mF_s9.B5f-4.1JqM
ERRORS
If the token is invalid, an error will be returned. Here are some sample errors:
Elevate your WordPress security and integration capabilities with JWT Authentication PRO . Building upon the solid foundation of the free version, the PRO version offers advanced features, enhanced security options, and a streamlined user experience:
Easy Configuration UI: Manage all settings directly from the WordPress admin area.
Token Refresh Endpoint: Allow users to refresh expired tokens seamlessly without requiring re-login.
Token Revocation Endpoint: Immediately invalidate specific tokens for enhanced security control.
Customizable Token Payload: Add custom claims to your JWT payload to suit your specific application needs.
Granular CORS Control: Define allowed origins and headers with more precision directly in the settings.
Rate Limiting: Protect your endpoints from abuse with configurable rate limits.
Audit Logs: Keep track of token generation, validation, and errors.
Priority Support: Get faster, dedicated support directly from the developer.
Upgrade to JWT Authentication PRO Today!
Free vs. PRO Comparison
Here’s a quick look at the key differences:
Basic JWT Authentication: Included (Free), Included (PRO)
Token Generation: Included (Free), Included (PRO)
Token Validation: Included (Free), Included (PRO)
Token Refresh Mechanism: Not Included (Free), Included (PRO)
Token Revocation: Not Included (Free), Included (PRO)
Token Management Dashboard: Not Included (Free), Included (PRO)
Analytics & Monitoring: Not Included (Free), Included (PRO)
Geo-IP Identification: Not Included (Free), Included (PRO)
Rate Limiting: Not Included (Free), Included (PRO)
Developer Tools: Not Included (Free), Included (PRO)
Premium Support: Community via GitHub (Free), Priority Direct Support (PRO)
02 / Source details
Gettingstarted.
Using The WordPress Dashboard
01Navigate to the ‘Add New’ in the plugins dashboard
02Search for ‘jwt-authentication-for-wp-rest-api’
03Click ‘Install Now’
04Activate the plugin on the Plugin dashboard
Uploading in WordPress Dashboard
05Navigate to the ‘Add New’ in the plugins dashboard
06Navigate to the ‘Upload’ area
07Select jwt-authentication-for-wp-rest-api.zip from your computer
08Click ‘Install Now’
09Activate the plugin in the Plugin dashboard
Please read our configuration guide to set up the plugin properly.
03 / Source details
Frequently asked questions.
Does this plugin support algorithms other than HS256?
The free version only supports HS256. For support for RS256, ES256, and other algorithms, please consider JWT Authentication PRO .
Can I manage settings without editing wp-config.php?
The free version requires editing wp-config.php . JWT Authentication PRO provides a full settings UI within the WordPress admin.
Is there a way to refresh or revoke tokens?
Token refresh and revocation features are available in JWT Authentication PRO .
Where can I get faster support?
Priority support is included with JWT Authentication PRO . For free support, please use the GitHub issues tracker .
How secure is JWT authentication?
JWT authentication is very secure when implemented correctly. Make sure to use a strong secret key and keep it confidential. JWT Auth PRO offers additional security features like rate limiting and token revocation.
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