# null Source: https://docs.jwtauth.pro/api-reference/endpoint/refresh post /jwt-auth/v1/token/refresh Refreshes an existing token using a refresh token # null Source: https://docs.jwtauth.pro/api-reference/endpoint/revoke post /jwt-auth/v1/token/revoke Revokes the current JWT token, making it immediately invalid # null Source: https://docs.jwtauth.pro/api-reference/endpoint/token post /jwt-auth/v1/token Authenticates a user and returns a JWT token # null Source: https://docs.jwtauth.pro/api-reference/endpoint/validate post /jwt-auth/v1/token/validate Validates a JWT token # API Reference Source: https://docs.jwtauth.pro/api-reference/introduction JWT Auth Pro provides a set of REST API endpoints for authentication and token management. All endpoints are accessible under the `/wp-json/jwt-auth/v1` namespace. ## Authentication Most endpoints require authentication using JWT tokens. To authenticate requests, include the token in the Authorization header: ```bash theme={null} Authorization: Bearer your-jwt-token ``` ## Base URL The base URL for all API endpoints is your WordPress site's REST API URL: ```bash theme={null} https://your-site.com/wp-json/jwt-auth/v1 ``` ## Response Format All responses are returned in JSON format. Successful responses include the requested data, while error responses follow this structure: ```json theme={null} { "code": "error_code", "message": "Human readable error message", "data": { "status": 403 } } ``` ## Rate Limiting API requests are subject to rate limiting based on your JWT Auth Pro settings. The current limits are: * Authentication attempts: 5 per minute per IP * Token validation: 60 per minute per token * Token refresh: 10 per minute per refresh token * Token revocation: 10 per minute per token When rate limiting is enabled, the following headers are included in API responses: ```bash theme={null} X-RateLimit-Limit: 60 # Maximum requests allowed X-RateLimit-Remaining: 45 # Remaining requests in current window X-RateLimit-Reset: 1707411600 # Unix timestamp when the rate limit resets Retry-After: 120 # Seconds to wait when rate limit is exceeded (only on 429 responses) ``` ### Rate Limit Exceeded When you exceed the rate limit, you'll receive a 429 (Too Many Requests) response: ```json theme={null} { "code": "jwt_auth_rate_limited", "message": "Rate limit exceeded", "data": { "status": 429 } } ``` Rate limiting can be configured or disabled through the WordPress admin interface or using filters. See the [Configuration](/wordpress/configuration#rate-limiting) and [Filters](/wordpress/filters#rate-limiting-filters) documentation for more details. # Bruno API Collection Source: https://docs.jwtauth.pro/developer-tools/bruno-collection Get started with JWT Authentication Pro using Bruno API client Our Bruno collection provides a basic set of API requests and automated tests for JWT Authentication Pro, designed for the developer to extend the collection to their needs. ## Collection Contents ```bash Route theme={null} POST /wp-json/jwt-auth/v1/token ``` * Generate JWT tokens with username/password * Includes validation tests for token format * Validates user data response ```bash Route theme={null} POST /wp-json/jwt-auth/v1/validate ``` * Validate existing JWT tokens * Test token validity and expiration * Verify token signature ```bash Route theme={null} POST /wp-json/jwt-auth/v1/refresh ``` * Refresh expired tokens * Automatic token management * Verify new token generation ```bash Route theme={null} POST /wp-json/jwt-auth/v1/token/revoke ``` * Revoke active JWT tokens * Test logout functionality * Verify token invalidation ```bash Route theme={null} GET /wp-json/jwt-auth/v1/me ``` * Retrieve user details * Validate user data structure * Test authorization flow ## Installation First, install Bruno by following the [official installation guide](https://usebruno.com/) Download or view the collection: JWT Auth Pro Bruno Collection (ZIP) View collection source on GitHub Extract the downloaded ZIP file to your project directory ## Environment Setup 1. Open Bruno and load the collection 2. Click on "Environments" in the right top corner 3. Select "local" environment Update the following variables in the environment editor: Your WordPress site URL (e.g., [https://your-site.com](https://your-site.com)) Your WordPress username Your WordPress password Click the "Save" button to apply your changes Go to the `environments` directory in the collection Copy `local.env.example.json` to `local.env.json` ```json Configuration theme={null} { "baseURL": "https://your-wordpress-site.com", "username": "your-username", "password": "your-password" } ``` Both methods achieve the same result. Choose the one that best fits your workflow. ## Running Tests ```bash Run All Tests theme={null} bru run --env local jwt-auth-pro ``` ```bash Run Single Test theme={null} bru run --env local jwt-auth-pro/token.bru ``` You can use the `--env` flag to switch between different environments (local, staging, production) ## Additional Resources Official Bruno documentation # Overview Source: https://docs.jwtauth.pro/developer-tools/overview Tools and resources for developers integrating JWT Authentication Pro # Developer Tools To help you test and integrate JWT Authentication Pro into your applications, we provide ready-to-use API collections for popular API testing tools. ## Available Collections Fast, lightweight, and Git-friendly API client with built-in testing capabilities Popular API platform with powerful collaboration and testing features ## Quick Start Select either Bruno or Postman based on your preferences and workflow Get the latest version of your preferred collection format Set up your environment variables with your WordPress credentials Execute the pre-configured test suite to verify your setup Both collections include the same functionality and testing capabilities, so you can choose the tool that best fits your workflow. # Postman API Collection Source: https://docs.jwtauth.pro/developer-tools/postman-collection Get started with JWT Authentication Pro using Postman Our Postman collection provides a basic set of API requests and automated tests for JWT Authentication Pro, designed for the developer to extend the collection to their needs. ## Collection Contents ```bash Route theme={null} POST /wp-json/jwt-auth/v1/token ``` * Generate JWT tokens with credentials * Pre-request scripts for auth * Response validation tests ```bash Route theme={null} POST /wp-json/jwt-auth/v1/validate ``` * Validate JWT tokens * Automatic header injection * Token status verification ```bash Route theme={null} POST /wp-json/jwt-auth/v1/refresh ``` * Refresh expired tokens * Auto token management * Token rotation tests ```bash Route theme={null} GET /wp-json/jwt-auth/v1/me ``` * Get user profile data * Auth header handling * Response validation ## Installation First, install Postman by downloading it from the [official website](https://www.postman.com/downloads/) Download or view the collection: JWT Auth Pro Postman Collection (ZIP) View collection source on GitHub Import the downloaded collection file into Postman ## Environment Setup 1. Open Postman and select the imported collection 2. Click on "Environments" in the left sidebar 3. Create a new environment named "JWT Auth Pro" Add the following variables in the environment editor: Your WordPress site URL (e.g., [https://your-site.com](https://your-site.com)) Your WordPress username Your WordPress password Click the "Save" button to apply your changes Create a new file named `jwt-auth-pro.postman_environment.json` ```json Configuration theme={null} { "name": "JWT Auth Pro", "values": [ { "key": "baseURL", "value": "https://your-wordpress-site.com", "type": "string", "enabled": true }, { "key": "username", "value": "your-username", "type": "string", "enabled": true }, { "key": "password", "value": "your-password", "type": "string", "enabled": true } ] } ``` Import the environment file into Postman Both methods achieve the same result. Choose the one that best fits your workflow. ## Running Tests ```bash Run All Tests theme={null} newman run jwt-auth-pro-postman.json -e jwt-auth-pro.postman_environment.json ``` ```bash Run Single Test theme={null} newman run jwt-auth-pro-postman.json -e jwt-auth-pro.postman_environment.json --folder "Token Generation" ``` You can use Newman, Postman's command-line collection runner, to automate your API tests in CI/CD pipelines ## Additional Resources Official Postman documentation # Core Concepts Source: https://docs.jwtauth.pro/introduction/concepts JSON Web Tokens are an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. In WordPress REST API authentication: ## JSON Web Tokens (JWT) JWTs consist of three parts: Header, Payload, and Signature, each base64-encoded and separated by dots Tokens carry all necessary information, reducing database queries and improving performance Digital signatures ensure token integrity and authenticity using cryptographic algorithms Can include custom claims for additional user data or permissions JWT Auth Pro uses [Firebase PHP-JWT](https://github.com/firebase/php-jwt) version 6.11.0 (latest version at the time of writing) for JWT handling, ensuring robust and secure token management. ## Token Types JWT Auth Pro implements a dual-token system for enhanced security. The system uses two distinct types of tokens: ### Access Tokens Short-lived tokens used for API authentication. They: * Carry user identity and permissions * Are included in the Authorization header for API requests * Have configurable expiration times * Are validated on each request ### Refresh Tokens Long-lived tokens used to maintain user sessions. They: * Are used to obtain new access tokens * Are stored securely in the database * Implement secure token rotation * Help maintain persistent authentication ## Token Lifecycle Understanding how tokens are managed throughout their lifetime: Tokens are generated upon successful authentication with user credentials Each API request validates the token's signature, expiration, and claims Access tokens are renewed using refresh tokens before expiration Tokens can be invalidated for security events or user actions ## Security Concepts Groups of related tokens that help prevent refresh token reuse and rotation attacks Prevents brute force attacks by limiting authentication attempts Maintains a list of revoked tokens for additional security and logging Invalidates tokens on security-critical user actions, like password changes, email changes, and more. ## Rate Limiting Rate limiting is a security feature that helps protect your API from abuse by limiting the number of requests a client can make within a specific time window. ### How It Works Each request is tracked based on the client's IP address Requests are counted within a configurable time window (default: 1 minute) When limits are exceeded (default: 60 requests per minute per IP), requests are blocked with a 429 (Too Many Requests) response After the time window expires, the request count resets automatically ### Rate Limit Headers JWT Auth Pro includes standard rate limit headers in API responses: Maximum number of requests allowed in the current time window Number of requests remaining in the current time window Unix timestamp when the current time window expires Seconds to wait before making another request (only present when rate limited) ### Default Limits Different endpoints have different rate limits to balance security and usability: * **Authentication**: 5 requests per minute per IP * Protects against brute force attacks * Applies to token generation endpoints * **Token Validation**: 60 requests per minute per token * Higher limit for API operations * Applies to protected endpoints * **Token Refresh**: 10 requests per minute per refresh token * Moderate limit for token renewal * Prevents refresh token abuse All rate limits are configurable through the WordPress admin interface or using filters. See the [Configuration](/wordpress/configuration#rate-limiting) documentation for more details. # Installation Source: https://docs.jwtauth.pro/introduction/installation Learn how to install and activate JWT Auth Pro on your WordPress site ## Prerequisites Before installing JWT Auth Pro, ensure your system meets these requirements: WordPress 6.0 or higher PHP 8.1 or higher Valid SSL certificate for production use WordPress REST API enabled ## Upgrading from Free Version If you're currently using the [JWT Authentication for WP REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) plugin, upgrading to JWT Auth Pro is seamless: Get your JWT Auth Pro license from [our website](https://jwtauth.pro) Go to **Plugins > Installed Plugins** and deactivate the free "JWT Authentication for WP REST API" plugin Follow the installation steps above to install and activate JWT Auth Pro JWT Auth Pro is 100% backwards compatible with the free version. Your existing JWT implementation will continue to work without any code changes required. ## Installation Steps Follow these steps to get JWT Auth Pro up and running: 1. Visit [JWT Auth Pro](https://jwtauth.pro) website 2. Choose your preferred license tier 3. Complete the purchase process 4. Check your email for license key and download link 1. Log in to your WordPress dashboard 2. Navigate to **Plugins > Add New > Upload Plugin** 3. Click **Choose File** and select the downloaded ZIP file 4. Click **Install Now** 5. After installation, click **Activate Plugin** 1. Go to **Settings > JWT Auth Pro > Account** 2. Enter your license key in the activation field 3. Click **Activate License** 4. Wait for confirmation message ## Post-Installation Setup After installation, you'll need to configure these essential settings: ### Permalink Configuration Configure your WordPress permalinks: 1. Go to **Settings > Permalinks** 2. Select "Post name" option (`https://your-site.com/sample-post/`) 3. Avoid default permalink structure (`https://your-site.com/?p=123`) 4. Save changes ### Secret Key Configuration Add the following code to your `wp-config.php` file: ```php theme={null} // Add this to your wp-config.php define('JWT_AUTH_SECRET_KEY', 'YOUR-UNIQUE-SECRET-KEY'); ``` Never share or commit your secret key. Keep it secure and unique for each environment. ### CORS Configuration (Optional) If your API clients are on different domains: 1. Go to **Settings > JWT Auth Pro > Settings** 2. Enable CORS Support 3. Add your allowed domains 4. Save changes ## Verify Installation To verify your installation is working correctly: ```bash Test Authentication theme={null} curl -X POST \ https://your-site.com/wp-json/jwt-auth/v1/token \ -H "Content-Type: application/json" \ -d '{"username": "your-username", "password": "your-password"}' ``` ```json Response theme={null} { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vand0LnRlc3QiLCJpYXQiOjE3MzkxNTM0NjcsIm5iZiI6MTczOTE1MzQ2NywiZXhwIjoxNzM5NzU4MjY3LCJkYXRhIjp7InVzZXIiOnsiaWQiOiIxIn19fQ.HbhV8GcC_ghqDj0y9B27iKbe6aDKO6P4pIgTJAs7-PM", "user_id": 1, "user_email": "user@example.com", "user_nicename": "username", "user_display_name": "Username", "refresh_token": "4c0fda4cbeacccad65ebdade95f5bda5" } ``` ## Caching Data The dashboard data is subject to caching: * General status metrics refresh every 8 hours * Chart data updates every 24 hours * Token listing shows real-time data without caching When first setting up, please allow up to 8 hours for initial dashboard data to appear. If you need to deactivate the caching on the general stats, change the constant `WP_DEBUG` to true in your `wp-config.php` file. ## Troubleshooting If you encounter any issues during installation, check these common solutions: * Ensure your WordPress version is compatible * Verify PHP version requirements * Check if REST API is accessible * Confirm SSL certificate is valid * Verify license key is active For additional support, visit our [support portal](https://jwtauth.freshdesk.com/support/tickets/new) or contact our team with your license key ready. # Overview Source: https://docs.jwtauth.pro/introduction/overview JWT Auth Pro is a premium WordPress plugin that provides secure, robust, and developer-friendly JWT (JSON Web Token) authentication for WordPress REST API. ## Key Features Complete authentication flow with token generation, validation, and refresh mechanisms Advanced token lifecycle with refresh tokens, expiration control, and family tracking Rate limiting, IP tracking, and token revocation Monitoring of token usage, API requests ## How It Works JWT Auth Pro implements a secure OAuth 2.0 compliant authentication flow. Here's how the authentication process works in your WordPress application: Client sends credentials to the authentication endpoint to obtain JWT tokens Use the JWT token to authenticate REST API requests via Authorization header Use refresh token to obtain new access tokens without re-authentication Revoke tokens on logout or when compromised to ensure security Track and manage tokens through the analytics dashboard ## Security Best Practices JWT Auth Pro comes with built-in security features to protect your WordPress application. Here are the key security measures you should be aware of: Automatic token revocation on password/email changes Automatic token revocation on user deletion Manual token revocation via API endpoint Configurable token expiration times Secure refresh token rotation # Quick Start Source: https://docs.jwtauth.pro/introduction/quickstart Get started quickly with JWT Authentication Pro This guide assumes you have already installed and configured JWT Auth Pro. If you haven't, please follow the [Installation Guide](/introduction/installation) first. ## Authentication Flow ### 1. Get a Token To authenticate a user and get a JWT token: ```bash cURL theme={null} curl -X POST \ https://your-site.com/wp-json/jwt-auth/v1/token \ -H "Content-Type: application/json" \ -d '{"username": "your-username", "password": "your-password"}' ``` ```javascript JavaScript theme={null} const response = await fetch('https://your-site.com/wp-json/jwt-auth/v1/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username: 'your-username', password: 'your-password' }) }); const auth = await response.json(); // Store auth.token and auth.refresh_token securely ``` ```php PHP - WordPress theme={null} $response = wp_remote_post( rest_url('jwt-auth/v1/token'), [ 'headers' => ['Content-Type' => 'application/json'], 'body' => json_encode([ 'username' => 'your-username', 'password' => 'your-password' ]) ]); if ( is_wp_error( $response ) ) { // Handle error $error_message = $response->get_error_message(); } else { $auth = json_decode( wp_remote_retrieve_body( $response ) ); // Store $auth->token and $auth->refresh_token securely } ``` ### 2. Use the Token Make authenticated requests using the token. Here's an example using the WordPress `/me` endpoint to get the current user's data: ```bash cURL theme={null} curl -X GET \ https://your-site.com/wp-json/wp/v2/users/me \ -H "Authorization: Bearer YOUR-JWT-TOKEN" ``` ```javascript JavaScript theme={null} const response = await fetch('https://your-site.com/wp-json/wp/v2/users/me', { headers: { 'Authorization': `Bearer ${token}` } }); const user = await response.json(); // Access user data: user.id, user.name, user.email, etc. ``` ```php PHP - WordPress theme={null} $response = wp_remote_get( rest_url('wp/v2/users/me'), [ 'headers' => [ 'Authorization' => 'Bearer ' . $token ] ]); if ( is_wp_error( $response ) ) { // Handle error $error_message = $response->get_error_message(); } else { $user = json_decode( wp_remote_retrieve_body( $response ) ); // Access user data: $user->id, $user->name, $user->email, etc. } ``` ### 3. Refresh Token When the access token expires, use the refresh token to get a new one: ```bash cURL theme={null} curl -X POST \ https://your-site.com/wp-json/jwt-auth/v1/token/refresh \ -H "Content-Type: application/json" \ -d '{"refresh_token": "YOUR-REFRESH-TOKEN"}' ``` ```javascript JavaScript theme={null} const response = await fetch('https://your-site.com/wp-json/jwt-auth/v1/token/refresh', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ refresh_token: refreshToken }) }); const newAuth = await response.json(); // Update stored tokens ``` ```php PHP - WordPress theme={null} $response = wp_remote_post( rest_url('jwt-auth/v1/token/refresh'), [ 'headers' => ['Content-Type' => 'application/json'], 'body' => json_encode([ 'refresh_token' => $refresh_token ]) ]); if ( is_wp_error( $response ) ) { // Handle error $error_message = $response->get_error_message(); } else { $auth = json_decode( wp_remote_retrieve_body( $response ) ); // Update stored tokens with $auth->token and $auth->refresh_token } ``` ### 4. Revoke Token (Logout) When a user logs out or you need to invalidate a token, use the revoke endpoint: ```bash cURL theme={null} curl -X POST \ https://your-site.com/wp-json/jwt-auth/v1/token/revoke \ -H "Authorization: Bearer YOUR-JWT-TOKEN" ``` ```javascript JavaScript theme={null} const response = await fetch('https://your-site.com/wp-json/jwt-auth/v1/token/revoke', { method: 'POST', headers: { 'Authorization': `Bearer ${token}` } }); if (response.ok) { // Token revoked successfully, clear stored tokens localStorage.removeItem('token'); localStorage.removeItem('refresh_token'); // Redirect to login page or update UI } ``` ```php PHP - WordPress theme={null} $response = wp_remote_post( rest_url('jwt-auth/v1/token/revoke'), [ 'headers' => [ 'Authorization' => 'Bearer ' . $token ] ]); if ( is_wp_error( $response ) ) { // Handle error $error_message = $response->get_error_message(); } else { $result = json_decode( wp_remote_retrieve_body( $response ) ); if ( $result->code === 'jwt_auth_token_revoked' ) { // Token revoked successfully, clear stored tokens // Redirect to login page or update session } } ``` Remember to never expose your JWT secret key or store tokens in plain text. Always use secure storage methods appropriate for your platform. # Release Notes Overview Source: https://docs.jwtauth.pro/release-notes/overview Track the evolution of JWT Authentication Pro with detailed release notes for each version Welcome to the JWT Authentication Pro release notes. Here you'll find detailed information about each version, including new features, improvements, bug fixes, and upgrade guidance. ## Current Version **Version 0.2.3** - Released March 4, 2026 Bug fixes for profile update token revocation, analytics cleanup, and user lifecycle hooks activation ## Version History * **[Version 0.2.3](/release-notes/v0-2-3)** - Current stable release with fixes for profile update token revocation, analytics cleanup on token deletion, and activation of user lifecycle hooks * **[Version 0.2.2](/release-notes/v0-2-2)** - Fixes for non-English WordPress installations, timezone handling improvements, and Freemius SDK 2.13.0 * **[Version 0.2.1](/release-notes/v0-2-1)** - Refresh token validation fix and support contact update * **[Version 0.2.0](/release-notes/v0-2-0)** - Token self-revocation endpoint, modern admin interface, CORS header fixes, and comprehensive testing infrastructure * **[Version 0.1.0](/release-notes/v0-1-0)** - Foundation release with core JWT authentication, analytics dashboard, security features, and modern admin interface ## What's in a Release? Each release page contains: * **🚀 New Features**: Brand new functionality and capabilities * **🛠️ Improvements**: Enhancements to existing features * **🐛 Bug Fixes**: Resolved issues and stability improvements * **📈 Performance**: Optimization and speed improvements * **⚠️ Breaking Changes**: Important compatibility information * **📋 Upgrade Guide**: Step-by-step upgrade instructions ## Release Schedule JWT Authentication Pro follows semantic versioning (SemVer): * **Major releases** (1.0.0, 2.0.0): Significant new features, possible breaking changes * **Minor releases** (0.2.0, 0.3.0): New features, backward compatible * **Patch releases** (0.2.1, 0.2.2): Bug fixes, security updates ## Stay Updated * **[Email Support](mailto:hello@jwtauth.pro)** - Get notified about important updates and security releases * **[Follow Development](https://jwtauth.pro)** - Stay informed about upcoming features and roadmap *** We recommend staying up to date with the latest version to ensure you have access to the newest features, security improvements, and bug fixes. # Version 0.1.0 Source: https://docs.jwtauth.pro/release-notes/v0-1-0 Initial release with core JWT authentication, analytics dashboard, and security features **Release Date**: Initial Launch\ **Status**: Foundation Release\ **Compatibility**: WordPress 5.0+, PHP 8.1+ Initial release of JWT Authentication Pro, introducing secure JWT authentication for WordPress REST API. ## 🚀 Core Features * **Secure JWT Authentication**: Industry-standard JSON Web Token authentication following OAuth 2.0 standards * **Token Refresh Mechanism**: Automatic token refresh for seamless user experience * **Analytics Dashboard**: Comprehensive dashboard for token usage monitoring * **Advanced Security Features**: Rate limiting, token revocation, secure headers, CORS support, IP-based security * **Developer-Friendly API**: Clean REST API endpoints with comprehensive documentation * **Modern Admin Interface**: Intuitive WordPress admin interface for easy configuration *** ## Getting Started * **[Quick Start Guide](/introduction/quickstart)** - Get up and running in minutes * **[API Reference](/api-reference/introduction)** - Explore all available endpoints * **[Configuration](/wordpress/configuration)** - Configure your security settings *** Version 0.1.0 provides a solid foundation for JWT authentication in WordPress. All features are production-ready and have been tested across various WordPress environments. # Version 0.2.0 Source: https://docs.jwtauth.pro/release-notes/v0-2-0 Token self-revocation, improved admin UI, CORS fixes, and enhanced testing infrastructure **Release Date**: June 30, 2025 **Compatibility**: WordPress 5.0-6.7, PHP 8.1+ Version 0.2.0 represents a significant step forward in JWT Authentication Pro's evolution, focusing on enhanced security control, user experience improvements, and development infrastructure. ## 🚀 New Features ### Token Self-Revocation API Endpoint Users can now programmatically revoke their own tokens, providing enhanced security control for applications and users. ```http theme={null} POST /wp-json/jwt-auth/v1/token/revoke Authorization: Bearer ``` **Benefits:** * Enhanced security for user-initiated logouts * Better control over token lifecycle * Improved compliance with security best practices ## 🛠️ Improvements ### Modern Admin Interface Redesign Completely redesigned admin interface with improved navigation and user experience. **Key Improvements:** * Clean, modern design following WordPress design guidelines * Improved navigation and user flow * Better responsive design for mobile devices * Enhanced accessibility features * Intuitive configuration wizards ### Enhanced UI Components Upgraded user interface components throughout the plugin. * Modern form controls and inputs * Improved data visualization in analytics * Better loading states and user feedback * Consistent design language across all interfaces ### Optimized Development Workflow Improved CI/CD pipeline for streamlined development and deployment. * Automated testing on multiple PHP versions * Enhanced code quality checks * Streamlined release process * Better documentation generation ## 🐛 Bug Fixes ### CORS Headers for JavaScript Clients **Issue**: JavaScript clients couldn't access rate limiting headers via CORS\ **Fix**: Properly exposed rate limiting headers through CORS configuration ```javascript theme={null} // Now JavaScript clients can access these headers const rateLimit = response.headers.get('X-RateLimit-Limit'); const remaining = response.headers.get('X-RateLimit-Remaining'); const reset = response.headers.get('X-RateLimit-Reset'); ``` ### Authentication Token Validation **Issue**: Authentication issues with token validation and null pointer errors\ **Fix**: Improved error handling and validation logic * Better null checks in token validation * Improved error messages for debugging * More robust token parsing and verification ### Improved Error Handling Enhanced error handling and user feedback throughout the plugin. * More descriptive error messages * Better logging for troubleshooting * Improved user notifications for configuration issues ## 📈 Performance ### Optimized Code Base * Reduced memory usage in token operations * Faster database queries for analytics * Improved caching mechanisms * Streamlined API response times ### Enhanced CI/CD Pipeline * Faster test execution * Parallel test running * Optimized build processes * Reduced deployment times ## 🛠️ Development Improvements ### Comprehensive Testing Infrastructure This section is relevant for plugin development and quality assurance. End users don't need to interact with these features. Added robust testing framework for better reliability and quality assurance. * **Unit Tests**: Comprehensive PHP unit test coverage * **Integration Tests**: End-to-end API testing * **Frontend Tests**: React component testing with Vitest * **E2E Tests**: Full application testing with Playwright ## 🔗 Related Documentation * **[API Reference](/api-reference/endpoint/revoke)** - Learn about the new token revocation endpoint * **[Configuration](/wordpress/configuration)** - Explore the updated admin interface *** ## Getting Help If you encounter any issues: Contact our support team directly Learn more about JWT Auth Pro *** This release focuses on stability, security, and user experience. All existing functionality remains unchanged while adding powerful new capabilities. # Version 0.2.1 Source: https://docs.jwtauth.pro/release-notes/v0-2-1 Refresh token validation fix and support contact update **Release Date**: September 18, 2025 **Compatibility**: WordPress 5.0-6.7, PHP 8.1+ Version 0.2.1 is a patch release that addresses a refresh token validation issue and updates the support contact method. ## Bug Fixes ### Refresh Token Validation Fix **Issue**: Refresh token validation was checking an incorrect expiration field **Fix**: Corrected the validation logic to check the proper expiration field, ensuring tokens are validated accurately ## Enhancements ### Updated Support Contact Changed the support contact method from the ticketing system to direct email for faster and more personal support responses. *** ## Getting Help If you encounter any issues: Contact our support team directly Learn more about JWT Auth Pro *** This patch release focuses on stability improvements. All existing functionality remains unchanged. # Version 0.2.2 Source: https://docs.jwtauth.pro/release-notes/v0-2-2 Bug fixes for internationalization, timezone handling, and Freemius SDK update **Release Date**: January 16, 2026 **Status**: Current Stable Version **Compatibility**: WordPress 5.0-6.7, PHP 8.1+ Version 0.2.2 is a patch release focused on improving internationalization support and fixing timezone-related issues with refresh token validation. ## Bug Fixes ### Refresh Token Validation on Non-English WordPress **Issue**: Refresh token validation was failing on WordPress installations using languages other than English **Fix**: Resolved date/time parsing to work correctly regardless of WordPress language settings ### Token Expiration with Custom Date Formats **Issue**: Token expiration checks could fail when WordPress used custom date/time format settings **Fix**: Expiration checks now work correctly with any date/time format configuration ### Timezone Handling for Refresh Tokens **Issue**: Refresh token validation could produce incorrect results due to timezone inconsistencies **Fix**: Improved timezone handling ensures consistent validation across different server and WordPress timezone configurations ## Updates ### Freemius SDK 2.13.0 Updated the Freemius SDK to version 2.13.0, bringing the latest improvements and fixes from the licensing framework. *** ## Getting Help If you encounter any issues: Contact our support team directly Learn more about JWT Auth Pro *** This patch release focuses on stability improvements for international WordPress installations. All existing functionality remains unchanged. # Version 0.2.3 Source: https://docs.jwtauth.pro/release-notes/v0-2-3 Bug fixes for profile update token revocation, analytics cleanup, and user lifecycle hooks activation **Release Date**: March 4, 2026 **Status**: Current Stable Version **Compatibility**: WordPress 5.0-6.7, PHP 8.1+ Version 0.2.3 is a patch release that activates user lifecycle hooks and fixes two bugs related to token revocation and analytics cleanup. ## Bug Fixes ### Profile Update Token Revocation **Issue**: When the "Revoke on Email Change" setting was disabled, the `handleProfileUpdate` method returned early, skipping the password-change revocation check entirely **Fix**: The early-return logic was corrected so that disabling email revocation no longer prevents password-change revocation from running ### Token Deletion Analytics Cleanup **Issue**: Deleting all tokens for a user left orphaned rows in the analytics table **Fix**: `deleteAllUserTokens` now cleans up associated analytics records when removing a user's tokens ## Improvements ### User Lifecycle Hooks Now Active The user lifecycle hooks configured in **Settings > JWT Auth Pro > User Settings** are now registered and fully functional. The following hooks are active: * **Password Change**: Revokes all user tokens when a password is changed or reset * **Email Change**: Revokes all user tokens when a user's email address is updated * **Role Change**: Revokes all user tokens when a user's role is modified * **User Deletion**: Deletes all user tokens and associated analytics when a user is removed These hooks were previously defined but not registered in the service provider. They are now activated automatically when the corresponding setting is enabled. *** ## Getting Help If you encounter any issues: Contact our support team directly Learn more about JWT Auth Pro *** This release ensures that user lifecycle settings work as documented. If you had previously configured these settings, they will now take effect automatically after updating. # Actions Source: https://docs.jwtauth.pro/wordpress/actions JWT Auth Pro provides a set of actions that allow you to hook into various events. Each action is documented below with its description and usage example. ## Token Events ### Authentication Actions #### `jwt_auth_token_generated` Fires when a new JWT token is generated after successful authentication. ```php theme={null} add_action('jwt_auth_token_generated', function($token, $user) { // Log token generation error_log("New token generated for user: {$user->ID}"); }, 10, 2); ``` #### `jwt_auth_token_refreshed` Fires when a token is refreshed using a refresh token. ```php theme={null} add_action('jwt_auth_token_refreshed', function($token, $user) { // Track token refresh events error_log("Token refreshed for user: {$user->ID}"); }, 10, 2); ``` #### `jwt_auth_token_validated` Fires when a token is successfully validated. ```php theme={null} add_action('jwt_auth_token_validated', function($decoded) { // Access validated token data $user_id = $decoded['data']['user']['id']; error_log("Token validated for user: {$user_id}"); }); ``` ### Token Management #### `jwt_auth_token_revoked` Fires when a token is revoked. ```php theme={null} add_action('jwt_auth_token_revoked', function($token_id, $token) { // Handle token revocation error_log("Token {$token_id} has been revoked"); }, 10, 2); ``` #### `jwt_auth_token_deleted` Fires when a token is deleted. ```php theme={null} add_action('jwt_auth_token_deleted', function($token_id, $token) { // Cleanup after token deletion error_log("Token {$token_id} has been deleted"); }, 10, 2); ``` ## Analytics Events #### `jwt_auth_analytics_aggregated` Fires when analytics data is aggregated. ```php theme={null} add_action('jwt_auth_analytics_aggregated', function($data) { // Process aggregated analytics data error_log("Analytics aggregated: " . print_r($data, true)); }); ``` #### `jwt_auth_analytics_consolidated` Fires when analytics data is consolidated. ```php theme={null} add_action('jwt_auth_analytics_consolidated', function($data) { // Process consolidated analytics data error_log("Analytics consolidated: " . print_r($data, true)); }); ``` #### `jwt_auth_analytics_cache_cleared` Fires when analytics cache is cleared. ```php theme={null} add_action('jwt_auth_analytics_cache_cleared', function() { // Handle cache clearing event error_log("Analytics cache has been cleared"); }); ``` #### `jwt_auth_analytics_cleanup_completed` Fires when analytics cleanup is completed. ```php theme={null} add_action('jwt_auth_analytics_cleanup_completed', function() { // Handle cleanup completion error_log("Analytics cleanup completed"); }); ``` ## Error Events #### `jwt_auth_error` Fires when various authentication errors occur. ```php theme={null} add_action('jwt_auth_error', function($error, $context) { // Handle different error contexts switch ($context) { case 'password_change': error_log("Password change error: " . $error->get_error_message()); break; case 'email_change': error_log("Email change error: " . $error->get_error_message()); break; case 'role_change': error_log("Role change error: " . $error->get_error_message()); break; case 'user_delete': error_log("User deletion error: " . $error->get_error_message()); break; } }, 10, 2); ``` All actions follow WordPress coding standards and can be used with the standard `add_action()` function. The examples above show practical implementations for each action. # Configuration Source: https://docs.jwtauth.pro/wordpress/configuration Configure JWT Authentication Pro via the settings page in WordPress All settings can be managed through the WordPress admin interface at **Settings > JWT Auth Pro**. Let's explore the available configuration options. ## Token Settings Configure how JWT tokens are generated and managed: ### Available Options: * **JWT Expiration**: Control how long access tokens remain valid (default: 7 days) * **Refresh Token Expiration**: Set the lifespan of refresh tokens (default: 30 days) * **Signing Algorithm**: Choose the algorithm for token signing (default: HS256) * **CORS Support**: Enable/disable CORS for cross-origin requests ## User Settings Control token behavior based on WordPress user events. These settings are active and trigger automatically when the corresponding user action occurs. As of v0.2.3, all user lifecycle hooks are registered and functional. If you had these settings enabled on a previous version, they will now take effect after updating. ### Revoke on Password Change Automatically revoke all tokens when a user changes their password (default: true). Triggers on the WordPress `profile_update`, `password_reset`, and `after_password_reset` hooks. This covers both admin-initiated password changes and user-initiated password resets. ### Revoke on Email Change Invalidate all tokens when a user updates their email address (default: true). Triggers on the WordPress `profile_update` hook. Note that WordPress requires email change confirmation via a link sent to the new address — the revocation fires only after the user confirms the change and the profile is updated. ### Revoke on Role Change Revoke all tokens when a user's role is modified (default: true). Triggers on the WordPress `set_user_role` hook. This ensures that any change in permissions immediately invalidates existing sessions. ### Delete on User Delete Remove all tokens and associated analytics records when a user is deleted (default: true). Triggers on the WordPress `delete_user` hook. Unlike the other settings which **revoke** tokens (marking them inactive), this setting **deletes** tokens and their associated analytics data entirely to prevent orphaned database rows. ## Data Management Configure how JWT Auth Pro handles data: * **Analytics Retention**: Control how long authentication analytics are stored (options: 30, 90, 180, 360 days, or Forever) Setting Analytics Retention to "Forever" may significantly increase your database size over time, depending on your site's traffic and authentication activity. Consider using a finite retention period for optimal performance. * **Delete on Deactivation**: Choose whether to remove all plugin data upon deactivation (default: true) When Delete on Deactivation is enabled, all plugin data will be permanently deleted upon plugin deactivation. This action cannot be undone, and data can only be recovered if you have a database backup prior to deactivation. * **Anonymize IP**: Option to anonymize IP addresses in analytics data (default: false) ## Rate Limiting Configure rate limiting for API endpoints: * **Enable Rate Limiting**: Turn rate limiting on/off (default: true) * **Max Requests**: Maximum number of requests allowed in the time window (default: 60) * **Window Minutes**: Time window for rate limiting in minutes (default: 1) Rate limit headers included in responses, this can be diasable via [Filters](/wordpress/filters#jwt-auth-rate-limit-headers-enabled). ``` X-RateLimit-Limit: Maximum requests allowed X-RateLimit-Remaining: Remaining requests in current window X-RateLimit-Reset: Timestamp when the rate limit resets Retry-After: Seconds to wait when rate limit is exceeded ``` ## Advanced Configuration ### Using RSA Keys (RS256) By default, JWT Auth Pro uses HS256 (HMAC SHA-256) for token signing. You can switch to RS256 (RSA SHA-256) for enhanced security, especially in distributed systems. #### 1. Generate RSA Keys First, generate a private/public key pair: ```bash theme={null} # Generate private key openssl genpkey -algorithm RSA -out private.key -pkeyopt rsa_keygen_bits:2048 # Generate public key openssl rsa -pubout -in private.key -out public.key ``` #### 2. Configure Keys Add these filters to your theme's `functions.php` or a custom plugin: ```php theme={null} // Set the algorithm to RS256 add_filter('jwt_auth_algorithm', function($algorithm) { return 'RS256'; }); // Set the private key for token signing add_filter('jwt_auth_secret_private_key', function($key) { return file_get_contents(ABSPATH . 'path/to/private.key'); }); // Set the public key for token validation add_filter('jwt_auth_secret_public_key', function($key) { return file_get_contents(ABSPATH . 'path/to/public.key'); }); ``` Store your keys securely and never commit them to version control. Consider using environment variables or WordPress constants in wp-config.php to store the key paths. #### 3. Key Storage Example A secure way to configure keys using constants: ```php theme={null} // In wp-config.php define('JWT_AUTH_PRIVATE_KEY_PATH', '/secure/path/private.key'); define('JWT_AUTH_PUBLIC_KEY_PATH', '/secure/path/public.key'); // In your code add_filter('jwt_auth_secret_private_key', function($key) { return file_get_contents(JWT_AUTH_PRIVATE_KEY_PATH); }); add_filter('jwt_auth_secret_public_key', function($key) { return file_get_contents(JWT_AUTH_PUBLIC_KEY_PATH); }); ``` #### 4. Using Key Strings Directly Alternatively, you can use the RSA key strings directly in your code: ```php theme={null} add_filter('jwt_auth_algorithm', function($algorithm) { return 'RS256'; }); add_filter('jwt_auth_secret_private_key', function($key) { return << While using key strings directly in code is possible, it's recommended to store them in secure environment variables or files for better security and key management. #### Benefits of RS256 * **Asymmetric Encryption**: Different keys for signing and verification * **Better Security**: Private key can be kept secret on the authentication server * **Scalability**: Public key can be distributed to multiple verification servers * **Standard Compliance**: Widely used in enterprise applications *** All configuration options can be managed through the WordPress admin interface at **Settings > JWT Auth Pro**. The constants in `wp-config.php` are optional and will override the settings in the admin interface if defined. # Cron Tasks Source: https://docs.jwtauth.pro/wordpress/cron-tasks Learn about the automated tasks that JWT Auth Pro schedules in WordPress JWT Auth Pro schedules several automated tasks to handle analytics data aggregation and cleanup. These tasks are essential for maintaining the performance and data management of your WordPress site. Aggregates daily analytics data at midnight UTC to maintain performance and provide insights. Performs deep analytics consolidation every Monday at 1 AM UTC for historical data. Manages data retention based on your configuration to maintain optimal database performance. ## Daily Analytics Aggregation **Hook Name**: `jwt_auth_daily_analytics` **Schedule**: Daily at midnight (UTC) This task aggregates the analytics data from the previous day into summary records for efficient dashboard access. The aggregation process collects and summarizes: * Total requests * Successful vs failed requests * Unique users * Average response times * Event types (token generation, validation, refresh) ## Weekly Analytics Consolidation **Hook Name**: `jwt_auth_weekly_consolidation` **Schedule**: Weekly on Monday at 1 AM (UTC) This task performs a deeper consolidation of analytics data: * Processes data from the previous 7 complete days * Ensures data consistency * Optimizes storage and query performance * Maintains historical trends and patterns ## Analytics Cleanup **Hook Name**: `jwt_auth_cleanup_analytics` **Schedule**: Daily This task manages the retention of analytics data based on your settings: * Removes analytics records older than the configured retention period * Respects the retention days setting from the admin dashboard * Skips cleanup if retention is set to "forever" (-1) * Helps maintain database performance and size ## Configuration You can configure the tasks through the JWT Auth Pro settings panel: 1. Navigate to Settings > JWT Auth Pro > Data Management 2. Adjust the Analytics Retention Days setting 3. Configure Data Anonymization options When the plugin is deactivated: * All scheduled tasks are automatically removed using `wp_clear_scheduled_hook()` * If "Delete data on deactivation" is enabled, all related data will be removed * Database tables and options are cleaned up ## Actions and Filters ```php theme={null} // Fires after daily analytics aggregation do_action('jwt_auth_analytics_aggregated', [ 'rows_affected' => $count, 'start_date' => $startDate, 'end_date' => $endDate, ]); // Fires after weekly analytics consolidation do_action('jwt_auth_analytics_consolidated', [ 'start_date' => $startDate, 'end_date' => $endDate, 'days_processed' => $count, ]); ``` These actions allow you to hook into the process and perform additional tasks. Be careful when adding hooks to these actions as they run automatically in the background. # Filters Source: https://docs.jwtauth.pro/wordpress/filters JWT Auth Pro provides a comprehensive set of filters that allow you to customize its behavior. Each filter is documented below with its description and usage example. ## Token Generation and Validation ### Authentication Filters #### `jwt_auth_before_authenticate` Allows you to modify the user object before the authentication process begins. ```php theme={null} add_filter('jwt_auth_before_authenticate', function($user) { // Perform additional user validation if ($user->has_cap('custom_capability')) { return new WP_Error('unauthorized', 'User not allowed'); } return $user; }); ``` #### `jwt_auth_issued_at` Allows you to change the token issuance timestamp (iat claim) for token timing synchronization. ```php theme={null} add_filter('jwt_auth_issued_at', function($timestamp) { // Add a 5-minute buffer return $timestamp + (5 * MINUTE_IN_SECONDS); }); ``` #### `jwt_auth_issuer` Allows you to change the token issuer (iss claim) for multi-site setups or custom API endpoints. ```php theme={null} add_filter('jwt_auth_issuer', function($issuer) { return 'https://api.yoursite.com'; }); ``` #### `jwt_auth_not_before` Allows you to set when the token becomes valid (nbf claim) for token activation control. ```php theme={null} add_filter('jwt_auth_not_before', function($time, $issued_at) { // Token becomes valid 5 minutes after issuance return $issued_at + (5 * MINUTE_IN_SECONDS); }, 10, 2); ``` #### `jwt_auth_expire` Allows you to customize when the token will expire (exp claim) based on roles or conditions. ```php theme={null} add_filter('jwt_auth_expire', function($expiration, $issued_at) { // Set expiration to 14 days return $issued_at + (14 * DAY_IN_SECONDS); }, 10, 2); ``` #### `jwt_auth_token_user_data` Allows you to modify the user data stored in the token payload. ```php theme={null} add_filter('jwt_auth_token_user_data', function($data, $user) { return array_merge($data, [ 'role' => $user->roles[0], 'display_name' => $user->display_name, 'email' => $user->user_email ]); }, 10, 2); ``` #### `jwt_auth_jwt_token_data_before_update` Allows you to modify the token data before it's updated. ```php theme={null} add_filter('jwt_auth_jwt_token_data_before_update', function($tokenData, $user) { $tokenData['custom_field'] = 'custom_value'; return $tokenData; }, 10, 2); ``` #### `jwt_auth_token_before_sign` Allows you to modify the complete token payload before signing. ```php theme={null} add_filter('jwt_auth_token_before_sign', function($token, $user) { $token['custom_claim'] = 'custom_value'; return $token; }, 10, 2); ``` #### `jwt_auth_algorithm` Allows you to change the algorithm used for token signing. ```php theme={null} add_filter('jwt_auth_algorithm', function($algorithm) { return 'RS256'; // Use RSA SHA-256 instead of default HS256 }); ``` #### `jwt_auth_secret_private_key` Allows you to set the private key for token signing. ```php theme={null} add_filter('jwt_auth_secret_private_key', function($key) { return file_get_contents('/path/to/private.key'); }); ``` #### `jwt_auth_secret_public_key` Allows you to set the public key for token validation. ```php theme={null} add_filter('jwt_auth_secret_public_key', function($key) { return file_get_contents('/path/to/public.key'); }); ``` #### `jwt_auth_token_before_dispatch` Allows you to modify the authentication response before it's sent to the client. ```php theme={null} add_filter('jwt_auth_token_before_dispatch', function($response, $user) { $response['user_email'] = $user->user_email; return $response; }, 10, 2); ``` ### Refresh Token Filters #### `jwt_auth_refresh_token_generation` Allows you to change how refresh tokens are generated for external providers. ```php theme={null} add_filter('jwt_auth_refresh_token_generation', function($token) { return md5(uniqid() . time()); // Use MD5 for token generation }); ``` #### `jwt_auth_refresh_token_expiration` Allows you to customize refresh token lifetime based on roles or conditions. ```php theme={null} add_filter('jwt_auth_refresh_token_expiration', function($expiration) { return 60 * DAY_IN_SECONDS; // Set to 60 days }); ``` #### `jwt_auth_refresh_token_data_before_update` Allows you to modify refresh token data before storage for token rotation. ```php theme={null} add_filter('jwt_auth_refresh_token_data_before_update', function($token_data, $user_id) { $token_data['custom_field'] = 'custom_value'; return $token_data; }, 10, 2); ``` ## Security and Settings ### Security Filters #### `jwt_auth_security_headers` Allows you to modify security headers sent with API responses for CORS and security policies. ```php theme={null} add_filter('jwt_auth_security_headers', function($headers) { $headers['X-Custom-Security'] = 'value'; return $headers; }); ``` #### `jwt_auth_error_messages` Allows you to customize authentication error messages for localization. ```php theme={null} add_filter('jwt_auth_error_messages', function($messages) { $messages['jwt_auth_invalid_token'] = 'Custom invalid token message'; return $messages; }); ``` #### `jwt_auth_error_status` Allows you to modify HTTP status codes for errors and API compliance. ```php theme={null} add_filter('jwt_auth_error_status', function($status, $code) { if ($code === 'jwt_auth_invalid_token') { return 401; // Change status to 401 } return $status; }, 10, 2); ``` #### `jwt_auth_anonymize_ip` Allows you to control IP address anonymization for GDPR compliance. ```php theme={null} add_filter('jwt_auth_anonymize_ip', function($anonymize) { return true; // Always anonymize IPs }); ``` ### Rate Limiting Filters #### `jwt_auth_rate_limit_enabled` Allows you to control if rate limiting is enabled. ```php theme={null} add_filter('jwt_auth_rate_limit_enabled', function($enabled) { return true; // Always enable rate limiting }); ``` #### `jwt_auth_rate_limit_headers_enabled` Allows you to control if rate limit headers are included in responses. ```php theme={null} add_filter('jwt_auth_rate_limit_headers_enabled', function($enabled) { return true; // Always send rate limit headers }); ``` #### `jwt_auth_rate_limit_max_requests` Allows you to customize the maximum number of requests allowed in the time window. ```php theme={null} add_filter('jwt_auth_rate_limit_max_requests', function($maxRequests) { return 10; // Allow 10 requests per window }); ``` #### `jwt_auth_rate_limit_window_minutes` Allows you to customize the time window for rate limiting in minutes. ```php theme={null} add_filter('jwt_auth_rate_limit_window_minutes', function($windowMinutes) { return 15; // Set window to 15 minutes }); ``` ## Token Management ### Token Actions #### `jwt_auth_revoke_tokens_on_password_change` Allows you to control token revocation on password changes for security policies. ```php theme={null} add_filter('jwt_auth_revoke_tokens_on_password_change', function($shouldRevoke, $userId) { return $userId !== 1; // Don't revoke tokens for admin user }, 10, 2); ``` #### `jwt_auth_revoke_tokens_on_email_change` Allows you to control token revocation on email changes. ```php theme={null} add_filter('jwt_auth_revoke_tokens_on_email_change', function($shouldRevoke, $userId) { return true; // Always revoke tokens on email change }, 10, 2); ``` #### `jwt_auth_revoke_tokens_on_role_change` Allows you to control token revocation on role changes. ```php theme={null} add_filter('jwt_auth_revoke_tokens_on_role_change', function($shouldRevoke, $userId) { return true; // Always revoke tokens on role change }, 10, 2); ``` #### `jwt_auth_delete_tokens_on_user_delete` Allows you to control token deletion when a user is deleted. ```php theme={null} add_filter('jwt_auth_delete_tokens_on_user_delete', function($shouldDelete, $userId) { return true; // Always delete tokens when user is deleted }, 10, 2); ``` ### IP and Location #### `jwt_auth_ip_headers` Allows you to specify which headers to check for client IP addresses. ```php theme={null} add_filter('jwt_auth_ip_headers', function($headers) { return array_merge($headers, [ 'X-Real-IP', 'X-Forwarded-For' ]); }); ``` #### `jwt_auth_default_ip` Allows you to set the fallback IP address when detection fails. ```php theme={null} add_filter('jwt_auth_default_ip', function($ip) { return '0.0.0.0'; }); ``` #### `jwt_auth_private_ip_country_code` Allows you to customize the country code for private IP addresses. ```php theme={null} add_filter('jwt_auth_private_ip_country_code', function($code) { return 'LO'; // Custom code for local IPs }); ``` #### `jwt_auth_unknown_country_code` Allows you to customize the country code for unknown locations. ```php theme={null} add_filter('jwt_auth_unknown_country_code', function($code) { return 'UN'; // Custom code for unknown locations }); ``` #### `jwt_auth_error_country_code` Allows you to customize the country code when geolocation fails. ```php theme={null} add_filter('jwt_auth_error_country_code', function($code) { return 'ER'; // Custom code for errors }); ``` All filters follow WordPress coding standards and can be used with the standard `add_filter()` function. The examples above show practical implementations for each filter.