πŸ”₯ Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer β†’
Account Get it free
Simple JWT Auth – JWT Authentication for WP REST API icon
Maintained Tested with WP 7.1 #15 in jwt

Simple JWT Auth – JWT Authentication for WP REST API

JWT authentication for the WordPress REST API: access and refresh tokens with rotation, revocation, and validation for headless and decoupled apps.

Active installs<10New
Downloads Β· 30d102β–² +6.3% vs prev. 30d
Ratingβ€”0 reviews
Health score54/100Fair
All-time downloads1.3KSince Oct 2024
Support resolvedβ€”No recent threads
RequiresWP 7.0PHP 8.2+
Downloads Β· 7d23β–Ό -11.5% week over week
Our verdict

Use with caution

Simple JWT Auth works, but test it on a staging site before relying on it in 2026. Was last updated 3 months ago, and scores 54/100 on our health check.

  • Tested with the latest WordPress (7.1)
  • Small user base (<10 active installs)
  • Very few reviews so far
  • Needs PHP 8.2 or newer

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

246Sep 4Oct 18Dec 2
Yesterday6
Daily average (1y)2
Peak day27Aug 26, 2026
Last 12 months609

Download spikes usually follow a new release β€” each site that auto-updates counts as a download.

Rankings

Where Simple JWT Auth stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
jwt #18 328 Best jwt plugins β†’
jwt authentication #15 221 Best jwt authentication plugins β†’
oauth >100 1,875 Best oauth plugins β†’
rest-api >100 10,000 Best rest-api plugins β†’
wp-api >100 10,000 Best wp-api plugins β†’

About Simple JWT Auth

From the official readme Β· v2.0.0

Description

Simple JWT Auth – JWT Authentication for WordPress REST API secures and protects your WordPress REST API using JSON Web Tokens. It lets external applications authenticate WordPress users, obtain an access token and a refresh token, and call any REST endpoint with a standard Bearer header.

JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact, self-contained way to transmit information securely between two parties. This plugin uses JWT to provide a modern, stateless authentication layer for headless WordPress builds.

Modern access-token and refresh-token architecture

  • Issues short-lived access tokens (stateless JWTs) alongside opaque refresh tokens.
  • Refresh-token rotation β€” every refresh issues a new access token and a new refresh token, so a leaked refresh token is quickly invalidated.
  • Reuse detection β€” re-presenting a rotated refresh token outside a short grace window revokes the entire token family and fires the simplejwt_auth_token_reuse_detected action.
  • Revocation β€” revoke a single refresh token, its whole rotation family, or all of a user’s sessions. Refresh tokens are also revoked automatically on logout and password reset.
  • Validation β€” a dedicated endpoint verifies an access token on demand, and a /me endpoint returns the authenticated user’s profile.

Secure by design

  • Signing keys (secret_key, private_key, public_key) are encrypted at rest with AES-256-GCM using a key-encryption-key (KEK) defined in wp-config.php.
  • Refresh tokens are opaque and stored only as SHA-256 hashes β€” the raw token is never written to the database.
  • Rate limiting (configurable) is applied to the token, refresh, and revoke endpoints to deter brute force.
  • Optional CORS support and optional XML-RPC disabling.

Modern and flexible

  • Requires PHP 8.2+ and WordPress 7.0+.
  • Supports HS256, HS384, HS512, RS256, RS384, RS512, ES256, and ES384 signing algorithms.
  • Extensible via filter and action hooks for payload, expiry, issuer, CORS headers, and the token response.

Built for developers β€” authenticate WordPress from React, Next.js, Vue, mobile apps, and any other external client. Configuration can live in the plugin settings or be overridden with wp-config.php constants.

Enable PHP HTTP Authorization Header

HTTP Authorization is the mechanism clients use to send credentials to a server β€” a special Authorization header in the HTTP request. Many shared hosts have it disabled by default.

Shared hosts

Add the following to your .htaccess file:

RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

WP Engine

Add the following to your .htaccess file:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Configuration

Simple JWT Auth uses a Key-Encryption-Key (KEK) to encrypt and decrypt the JWT signing keys (secret_key, private_key, and public_key) at rest. Define it in wp-config.php with the SIMPLE_JWT_AUTH_ENCRYPT_KEY constant. The KEK must be exactly 32 characters long and must never be revealed.

define( 'SIMPLE_JWT_AUTH_ENCRYPT_KEY', 'your-32-char-encryption-key' );

Rotating the KEK invalidates the stored signing keys and requires re-entering them in the plugin settings (a simplejwt_kek_mismatch error is returned until then).

Signing keys via wp-config.php constants

Instead of storing signing keys in the database, define them directly in wp-config.php file. Constants take precedence over the plugin settings, and their values are used as-is (plaintext, not encrypted).

define( 'SIMPLE_JWT_AUTH_ALGORITHM', 'HS256' );            // HS256, HS384, HS512, RS256, RS384, RS512, ES256 or ES384.
define( 'SIMPLE_JWT_AUTH_SECRET_KEY', 'your-secret-key' ); // Required for HS* algorithms (min 32 chars).
define( 'SIMPLE_JWT_AUTH_PRIVATE_KEY', '-----BEGIN PRIVATE KEY-----...' ); // Required for RS*/ES* signing.
define( 'SIMPLE_JWT_AUTH_PUBLIC_KEY', '-----BEGIN PUBLIC KEY-----...' );   // Required for RS*/ES* verification.
  • SIMPLE_JWT_AUTH_ALGORITHM β€” overrides algorithm, the JWT signing algorithm.
  • SIMPLE_JWT_AUTH_SECRET_KEY β€” overrides secret_key, used for symmetric (HS256/384/512) signing and verification.
  • SIMPLE_JWT_AUTH_PRIVATE_KEY β€” overrides private_key, used for asymmetric (RSA/EC) signing.
  • SIMPLE_JWT_AUTH_PUBLIC_KEY β€” overrides public_key, used for asymmetric (RSA/EC) verification.

When a constant is defined, the matching field on the Settings page is disabled and marked “Defined in wp-config.php”.

Enabling authentication

For a fresh install, authentication is disabled by default. Turn on Enable JWT in the plugin settings, choose an algorithm, and provide the required signing key(s) before issuing tokens.

REST Endpoints

The plugin registers the auth/v1 namespace with five endpoints:

  • POST /wp-json/auth/v1/token β€” Authenticate credentials; return an access token and a refresh token.
  • POST /wp-json/auth/v1/token/refresh β€” Rotate an access token (and refresh token) using a refresh token.
  • POST /wp-json/auth/v1/token/revoke β€” Revoke a refresh token and its rotation family.
  • POST /wp-json/auth/v1/token/validate β€” Validate an access token.
  • GET /wp-json/auth/v1/me β€” Return the authenticated user’s profile.

Generate a token

Submit a POST request with username and password:

curl --location 'https://example.com/wp-json/auth/v1/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "wordpress_username",
    "password": "wordpress_password"
}'

Success response:

{
    "code": "simplejwt_auth_credential",
    "message": "Token created successfully",
    "data": {
        "status": 200,
        "id": "2",
        "email": "user@example.com",
        "nicename": "username",
        "display_name": "User Name",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOi...",
        "token_expires_in": 900,
        "refresh_token": "opaque-refresh-token",
        "refresh_expires_in": 1209600
    }
}

Store the access token and refresh token in your application (a secure cookie, localStorage, or a wrapper such as localForage). Then pass the access token as a Bearer header on every protected request:

Authorization: Bearer your-access-token

For example, creating a post with an access token:

curl --location 'https://example.com/wp-json/wp/v2/posts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOi...' \
--data '{
    "title": "Hello headless",
    "content": "Created through the REST API with JWT authentication.",
    "status": "publish"
}'

Refresh a token

Access tokens are short-lived. When one expires, send the refresh token to /token/refresh (in the body or as a Bearer header) to rotate it and receive a new access token and refresh token:

curl --location 'https://example.com/wp-json/auth/v1/token/refresh' \
--header 'Content-Type: application/json' \
--data-raw '{ "refresh_token": "opaque-refresh-token" }'

The response has the same shape as the token response. Each rotation invalidates the previous refresh token.

Revoke a token

To invalidate a session, send the refresh token to /token/revoke:

curl --location 'https://example.com/wp-json/auth/v1/token/revoke' \
--header 'Content-Type: application/json' \
--data-raw '{ "refresh_token": "opaque-refresh-token" }'

Success response:

{
    "code": "simplejwt_token_revoked",
    "message": "Token has been revoked",
    "data": { "status": 200 }
}

Validate a token

Verify an access token with a POST request carrying the Bearer header:

curl --location --request POST 'https://example.com/wp-json/auth/v1/token/validate' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOi...'

Success response:

{
    "code": "simplejwt_valid_token",
    "message": "Token is valid",
    "data": { "status": 200 }
}

Current user

Get the authenticated user’s profile:

curl --location 'https://example.com/wp-json/auth/v1/me' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOi...'

Success response:

{
    "code": "simplejwt_user",
    "message": "User data retrieved successfully",
    "data": {
        "status": 200,
        "id": 2,
        "email": "user@example.com",
        "nicename": "username",
        "display_name": "User Name",
        "roles": ["administrator"]
    }
}

REST Errors

Every error returns a consistent envelope with a stable code, a message, and a data.status HTTP status. Common codes include:

  • simplejwt_missing_credentials β€” Username or password is missing.
  • simplejwt_invalid_username β€” The username is not registered on this site.
  • simplejwt_incorrect_password β€” The password is incorrect.
  • simplejwt_no_auth_header β€” The Authorization header is missing.
  • simplejwt_bad_auth_header β€” The Authorization header is malformed.
  • simplejwt_invalid_token β€” The access token is invalid (bad signature, malformed, or not yet valid).
  • simplejwt_expired_token β€” The access or refresh token has expired.
  • simplejwt_invalid_refresh_token β€” The refresh token is unknown or invalid.
  • simplejwt_reused_refresh_token β€” A rotated refresh token was reused; the token family was revoked.
  • simplejwt_revoked_token β€” The token has been revoked.
  • simplejwt_bad_issuer β€” The token issuer does not match this server.
  • simplejwt_unsupported_algorithm β€” The configured signing algorithm is unsupported.
  • simplejwt_rate_limited β€” Too many requests; please try again later.
  • simplejwt_bad_config β€” JWT authentication is not configured or is disabled.
  • simplejwt_bad_encryption_key β€” The key-encryption-key is not configured.
  • simplejwt_invalid_enckey_length β€” The key-encryption-key is not exactly 32 characters.
  • simplejwt_kek_mismatch β€” The key-encryption-key was rotated; re-enter the signing keys.

Available Hooks

Simple JWT Auth is developer-friendly and exposes filter and action hooks to override its default behaviour.

simplejwt_cors_allow_headers (filter)

Modify the CORS Access-Control-Allow-Headers value. Default: Access-Control-Allow-Headers, Content-Type, Authorization.

add_filter( 'simplejwt_cors_allow_headers', function ( $headers ) {
    return $headers;
} );

simplejwt_auth_iss (filter)

Change the token iss (issuer) claim. Default: get_bloginfo( 'url' ).

add_filter( 'simplejwt_auth_iss', function ( $iss ) {
    return $iss;
} );

simplejwt_not_before (filter)

Change the token nbf (not-before) claim. Default: the issue time.

add_filter( 'simplejwt_not_before', function ( $not_before, $issued_at ) {
    return $not_before;
}, 10, 2 );

simplejwt_auth_expire (filter)

Change the token exp (expiry) claim. Default: time() + access token lifetime (900 seconds by default).

add_filter( 'simplejwt_auth_expire', function ( $expire, $issued_at ) {
    return $expire;
}, 10, 2 );

simplejwt_payload_before_sign (filter)

Modify the JWT payload before it is signed. The payload contains the iss, iat, nbf, exp, sub, and jti claims (plus the legacy data.user.id).

add_filter( 'simplejwt_payload_before_sign', function ( $payload, $user ) {
    return $payload;
}, 10, 2 );

simplejwt_token_before_dispatch (filter)

Modify the token response before it is returned to the client. The response includes the access token, refresh token, and their lifetimes.

add_filter( 'simplejwt_token_before_dispatch', function ( $data, $user ) {
    return $data;
}, 10, 2 );

simplejwt_auth_token_reuse_detected (action)

Fired when refresh-token reuse is detected and a token family is revoked. Arguments: $user_id, $family_id, $ip.

add_action( 'simplejwt_auth_token_reuse_detected', function ( $user_id, $family_id, $ip ) {
    // Alert, log, or revoke further sessions here.
}, 10, 3 );

simplejwt_rate_limit_max (filter)

Change the maximum number of attempts allowed within the rate-limit window. Default: 10.

add_filter( 'simplejwt_rate_limit_max', function ( $max ) {
    return $max;
} );

simplejwt_rate_limit_window (filter)

Change the rate-limit window, in seconds. Default: MINUTE_IN_SECONDS (60).

add_filter( 'simplejwt_rate_limit_window', function ( $window ) {
    return $window;
} );

Postman Collection

A ready-to-use Postman collection is bundled with the plugin. Open Simple JWT Auth β†’ Documentation in your WordPress admin and click Download Postman Collection, then import the JSON into Postman. The collection preconfigures your site URL and includes the token, refresh, revoke, validate, and /me requests.

Installation

Using FTP

  1. Download the plugin from here.
  2. Unzip the simple-jwt-auth.zip file.
  3. Upload the simple-jwt-auth folder to the /wp-content/plugins/ directory.
  4. Activate the plugin through the Plugins dashboard.

Uploading from the dashboard

  1. Download the plugin from here.
  2. In the dashboard, go to Plugins β†’ Add New Plugin.
  3. Click Upload Plugin.
  4. Select the simple-jwt-auth.zip file.
  5. Click Install Now.
  6. Activate the plugin through the Plugins dashboard.

Changelog

Version 2.0.0 is a major release requiring PHP 8.2+ and WordPress 7.0+. It introduces refresh-token rotation and revocation and now enforces the Enable JWT setting. Existing installs with configured signing keys are automatically kept enabled.

2.0.0

  • Added refresh tokens with rotation and revocation (POST /token/refresh, POST /token/revoke).
  • Added the /auth/v1/me endpoint to return the authenticated user profile.
  • Added access token and refresh token lifetime settings.
  • Added rate limiting to the token, refresh, and revoke endpoints.
  • Enforced the enable_auth setting, auto-migrating existing configurations to stay enabled.
  • Updated firebase/php-jwt to ^7.1 and raised requirements to WordPress 7.0 / PHP 8.2.
  • Corrected the supported algorithms list (HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384).
  • Security hardening: opaque refresh tokens stored SHA-256 hashed, reuse detection, and revocation on logout and password reset.

1.0.2

  • Tested up to WordPress 6.7.

1.0.1

  • Disabled direct file access.
  • Fixed the undefined variable notice in the admin area.
  • Bug fixes and improvements.

1.0.0

  • Initial release.

Full changelog on WordPress.org β†’

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own β€” no account needed.

Active installs badge Rating badge Health score badge

Best Simple JWT Auth alternatives

All jwt plugins β†’
Alternatives
Rank Plugin Active installs Rating Updated Health
1 JWT Authentication for WP REST API JWT Authentication for WP REST API Extends the WP REST API using JSON Web Tokens Authentication as an authentication method. by tmeister 50K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.4 (53) 2 weeks ago 88
2 JWT Auth JWT Auth Create JSON Web Token Authentication in WordPress. by Bagus 6K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (22) 2 weeks ago 89
3 Simple JWT Login – JWT Authentication for REST API Simple JWT Login – JWT Authentication for REST API Modern JWT authentication for WordPress REST APIs, headless frontends, mobile apps… by Nicu Micle 4K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (47) 8 hours ago 93
4 Firebase Authentication Firebase Authentication This plugin allows login into WordPress using Firebase user credentials and maps Firebase… by miniOrange 400+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4 (20) 1 week ago 82
5 API Bearer Auth API Bearer Auth Access and refresh tokens based authentication plugin for the REST API. by michielve 300+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (6) 12 months ago 53
6 REST API Guard REST API Guard Restrict and control anonymous access to the WordPress REST API, with optional JSON Web… by Sean Fisher 200+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (2) 2 months ago 72
7 CoCart JWT Authentication CoCart JWT Authentication JWT Authentication for CoCart API. by CoCart Headless 200+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… No reviews 8 months ago 41
8 WP Login and Register using JWT WP Login and Register using JWT WordPress login (WordPress Single Sign-On) using JWT token obtained from other WordPress… by miniOrange 100+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (5) 3 weeks ago 75
9 Simple REST API Authenticaton with WooCommerce Credentials Simple REST API Authenticaton with WooCommerce Credentials Simple REST API Authentication plugin for WordPress - a powerful solution for integrating… by oneteamsoftware 60+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (1) 2 months ago 71
10 User Data Fields For JWT Authentication User Data Fields For JWT Authentication Wordpress is a good content mangement system for building websites, but it will be better… by Ahmed Hnewa 30+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (3) 4 years ago 31

FAQ

Simple JWT Auth: quick answers

Straight answers, pulled from live WordPress.org data.

Source: WordPress.org

Is Simple JWT Auth free?

Yes. Simple JWT Auth is free to download and use from the official WordPress.org plugin directory.

Is Simple JWT Auth safe to use in 2026?

Simple JWT Auth works, but test it on a staging site before relying on it in 2026. Was last updated 3 months ago, and scores 54/100 on our health check.

How many websites use Simple JWT Auth?

Simple JWT Auth is active on <10 WordPress websites and has been downloaded 1,281 times since it launched in October 2024. It was downloaded 102 times in the last 30 days.

Does Simple JWT Auth work with WordPress 7.1?

Yes. The developer has tested Simple JWT Auth up to WordPress 7.1.5, the latest release. It requires WordPress 7.0 or newer.

What PHP version does Simple JWT Auth need?

Simple JWT Auth requires PHP 8.2 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Simple JWT Auth last updated?

The latest version, 2.0.0, was released on August 26, 2026 (3 months ago).

Who makes Simple JWT Auth?

Simple JWT Auth is developed and maintained by Sayan Dey.

What are the best alternatives to Simple JWT Auth?

The most popular alternatives to Simple JWT Auth are JWT Authentication for WP R… (50K+ installs), JWT Auth (6K+ installs) and Simple JWT Login (4K+ installs).

Powered by PageForge

One template and a spreadsheet. A real page for every search.

PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.

  • CSV and XLSX, plus Google Sheets on Professional and Enterprise
  • Its own title, URL, SEO fields and schema for every page
  • Works with the block editor, Elementor, Divi and Avada
  • Free on WordPress.org, no credit card

↑↓ to move↡ to open