跳到内容

Simple JWT Login – JWT Authentication for REST API

v4.2.1

Nicu Micle · 2019年6月14日 上架

Modern JWT authentication for WordPress REST APIs, headless frontends, mobile apps, WooCommerce and WPGraphQL - fully free, no upsells.

正在使用
4,000+
评分
5.0 / 5
累计下载
11 万
最近更新
2026年11月23日
47 条评价需要 WordPress 6.2+已测试到 7.1.5PHP 5.5+

贡献者

截图

Dashboard - every route's status at a glance, with security notices for risky settings
Dashboard - every route's status at a glance, with security notices for risky settings
General - signing algorithm and keys, user identification, and where tokens are read from
General - signing algorithm and keys, user identification, and where tokens are read from
Login - auto-login, redirects after login, and access control
Login - auto-login, redirects after login, and access control
Register - registration endpoint, default roles, random passwords, and allowed user meta
Register - registration endpoint, default roles, random passwords, and allowed user meta
Delete User - delete endpoint with auth code and IP restrictions
Delete User - delete endpoint with auth code and IP restrictions
Reset Password - reset and change password flow with customizable emails
Reset Password - reset and change password flow with customizable emails
Authenticate - JWT generation with a live payload preview, issuer, audience, and expiration
Authenticate - JWT generation with a live payload preview, issuer, audience, and expiration
Refresh Token - refresh token endpoint and token lifetime
Refresh Token - refresh token endpoint and token lifetime

Log users in, register them, and protect your WordPress REST API with JSON Web Tokens – all from a friendly admin screen, without writing a single line of PHP.

Simple JWT Login turns WordPress into a secure backend for your headless frontend, mobile app, or external service. Next.js, React, Vue, React Native, Flutter, a Node.js server or a CI pipeline: if it can send an HTTP request, it can authenticate with your WordPress site.

And it is 100% free and open source. Refresh tokens, API keys, audit logs, webhooks, OAuth social login and two-factor authentication are all included. No Pro plan, no feature locks, no telemetry.

Trusted on 4,000+ WordPress sites, rated 5 stars on WordPress.org, and actively maintained since 2019.

“This is by far the best JWT plugin for headless. I’ve tried them all!”
– a developer, in a 5-star WordPress.org review

👉 Quick Start · Documentation · API Reference · Live Demos

⚡ See how simple it is

Send your credentials, get a token back:

curl -X POST \
  https://your-site.com/wp-json/simple-jwt-login/v1/auth \
  -d email=jane@example.com \
  -d password=secret

The response:

{
  "success": true,
  "data": {
    "jwt": "eyJ0eXAiOiJKV1Qi...",
    "refresh_token": "a1b2c3d4..."
  }
}

Turn on JWT Middleware for all WordPress endpoints, then call any WordPress REST endpoint as that user:

curl https://your-site.com/wp-json/wp/v2/users/me \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1Qi..."

That’s the whole integration. Everything else – refresh, auto-login, social login, protected routes – is a toggle away.

⭐ Like what you see? Star Simple JWT Login on GitHub and browse the source.

✨ Why developers choose Simple JWT Login

  • No code required – every feature is a toggle in a clean, tab-based admin UI.
  • Everything is free – the features other plugins sell as “Pro” ship here at no cost.
  • Up and running in five minutes – copy the auto-generated sample URLs and try them right in the built-in endpoint tester.
  • Secure by default – every endpoint starts disabled, and a security report on the dashboard points out risky settings.
  • Runs on any host – from PHP 5.5 all the way to PHP 8, on WordPress 6.2 and newer.
  • Truly open source – GPL 3.0, no obfuscated code, built in the open on GitHub.

🧰 Everything in one plugin

  • Authentication – generate, refresh, validate and revoke JWTs, with HS or RS signing and custom claims. Learn more
  • Auto-login – send users from your app straight into WordPress, already logged in. Learn more
  • User management – register, reset passwords and delete accounts over REST, with auth codes for extra protection.
  • Social login – Google, Facebook, GitHub and Auth0. Learn more
  • Protected endpoints – choose who can reach each REST route: public, any logged-in user, or specific roles. Learn more
  • CORS – let your frontend’s domain call the API safely. Learn more
  • API keys – credentials with their own permissions and expiry for servers and scripts. Learn more
  • Audit logs and webhooks – see every login attempt and notify your other systems. Audit logs · Webhooks

🧩 Plays well with your favorite plugins

  • 🛒 WooCommerce – build a headless store: cart, checkout and customer accounts over the REST and Store APIs, authenticated with a JWT and no session cookies. Learn more
  • 🔐 Two Factor – users who have 2FA turned on send their code to /auth/2fa before they get a token, so your app is as safe as wp-login.php. Learn more
  • 🕸️ WPGraphQL – run authenticated GraphQL queries and mutations as the logged-in user. Learn more
  • 🚪 Force Login – keep your site private while your app can still reach the login endpoints. Learn more
  • 🤖 AI Abilities (MCP) – let AI agents check, configure and troubleshoot the plugin, with access you control. Learn more

🛠️ Built for developers

Hooks · PHP SDK · JavaScript SDK · CLI · Code examples · Error codes

🔒 Security you can verify

Authentication is only as good as its maintenance. Security reports are handled through responsible disclosure (Patchstack) and fixed within days, and every fix ships with a regression test that reproduces the original issue.

  • Unit, integration and real-browser cross-site (CSRF and CORS) test suites run on every change
  • Static analysis with PHPStan and PHPMD, and WordPress coding standards
  • Brute-force protection plugins (Limit Login Attempts, Wordfence) cover the login endpoint just like wp-login.php
  • The open source code is on GitHub – read it, audit it, contribute

💚 Free, and staying free

Here is what you get compared to the typical WordPress JWT plugin:

  • JWT authentication – free here, free elsewhere
  • Refresh tokens – free here, often paid or missing elsewhere
  • API keys, audit logs, webhooks – free here, premium elsewhere
  • Google, Facebook, GitHub and Auth0 login – free here, premium elsewhere
  • WPGraphQL, WooCommerce and two-factor support – free here, rarely available elsewhere
  • Custom JWT claims – free from the admin screen here, code or premium elsewhere

If it saves you time, a donation or a 5-star review keeps the project going.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums