WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Bagus v3.0.2

JWT Auth

Create JSON Web Token Authentication in WordPress.

JWT Auth

The facts

Rating
5★ from 22
Active installs
6k+
Price
Free
Last updated
7 May 2024
Added
May 2020
Requires WP
5.2
Tested up to
WP 6.5.10
Requires PHP
7.2
Downloads
113,690

Our analysis

AI-assisted

JWT Auth – WordPress JSON Web Token Authentication is a plugin that facilitates REST API authentication using JSON Web Tokens (JWT). It is designed to be simple and user-friendly, making it suitable for developers looking to implement token-based authentication in their WordPress sites.

The plugin includes features such as refresh tokens and adjustments to token expiry times. It also simplifies the process of managing authentication for custom REST API routes, reducing potential conflicts with other plugins. This plugin is ideal for developers working with APIs and needing secure authentication methods.

Best for: Developers implementing token-based authentication in WordPress sites.

What it does well

  • Allows REST API authentication via token
  • Easy to use and non-complex
  • Supports refresh tokens
  • Reduces conflicts with other plugins

Where it falls short

  • Limited information on specific features and use cases
  • Requires configuration for shared hosts

Verdict

This plugin provides a straightforward solution for JWT authentication, though users may need to configure it for specific hosting environments.

From the developer

Bagus's own description of JWT Auth, lightly tidied.

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.

Upgrading to v3

When updating from v2 to v3, familiarise yourself with its changes to ensure that your site continues to work as expected:

New: Refresh tokens ([docs](https://github.com/usefulteam/jwt-auth#refreshing-the-access-token))

Key changes:

  • 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

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for integrating services.

LocoAI

LocoAI

89

LocoAI - Auto Translate For Loco Translate is a powerful tool for developers looking to quickly translate thei...

Free 70k+ installs 4.9★ (637)
Uncanny Automator

The AI + Automation plugin for WordPress. Automate workflows across all your plugins and apps, add an AI agent...

Free 40k+ installs 4.9★ (156)
Open User Map

Create custom interactive maps with free Leaflet-based styles, no Google Maps API key, frontend marker submiss...

Free 10k+ installs 5★ (67)
Activity Log

Monitor every change on your WordPress site — who did what, when, and where it came from — for a complete audi...

Free 200k+ installs 4.3★ (74)
Reviews Feed

No API key required. Display Yelp and Google reviews for any business in a clean, customizable feed on your si...

Free 100k+ installs 4.4★ (34)
Bit integrations

Contact Form, Google Sheet, MailChimp, Brevo, Webhook, Zoho CRM Automation and Integration plugin that Connect...

Free 20k+ installs 4.9★ (160)