Horje
Create JSON Web Token Authentication in WordPress. Wordpress Tutorial

Noted That:

  • To install correctly this jwt-auth.zip .
  • Fisrt Download the jwt-auth.zip to your computer
  • Extract/Open jwt-auth.zip to Your Computer.
  • Then, Find readme.txt file inside jwt-auth.zip and Open readme.txt .
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the Tips Below.

Start the Tips:

1. First Download " jwt-auth.zip " Plugin to your Local Computer. (Click Download)

2. Then, Login to your " yourdomain.com/wp-admin " Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on " Plugins " + " Add New " from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse " jwt-auth.zip "  Downloaded plugin from your computer, Where you downloaded jwt-auth.zip According to Step – 1 Above then, click on " Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on " Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. " JWT Auth – WordPress JSON Web Token Authentication " folder is added on left sidemenu. Now, Click on " JWT Auth – WordPress JSON Web Token Authentication " folder.

   Noted that: If you do not see " JWT Auth – WordPress JSON Web Token Authentication " folder on left sidemenu then, see at left sidemenu " Settings " or " Tools ".

8. Now you configure yourself oR Watch video tutorial below about  JWT Auth – WordPress JSON Web Token Authentication Configurtions and Settings or How to work " JWT Auth – WordPress JSON Web Token Authentication " in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to " Plugins " + " Installed Plugin " from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find " JWT Auth – WordPress JSON Web Token Authentication " Activated Plugin from Plugin List.
  4. Then, Click on " Settings " from Plugin that is JWT Auth – WordPress JSON Web Token Authentication
  5. Now, Edit/Add/Config the setting and Click on " Save Changes " button,
WP Plugin Setting



Guide

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

To enable this option you’ll need to edit your .htaccess file by adding the following (see this issue ):


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

Installing Through the WordPress Administrative Area:

  • From WordPress administrative area, go to Plugins -> Add New
  • Search for JWT Auth
  • Install it
  • Easily configure it (see “Configuration” below)
  • and then activate it

Installing by Downloading Manually:

  • Download the plugin from WordPress plugins page
  • Upload to your wp-content directory
  • Easily configure it (see “Configuration” below)
  • Activate it from Plugins menu in admin area

Configuration

Configurate the Secret Key

The JWT needs a secret key to sign the token. It must be unique and never be revealed.

To add the secret key , edit your wp-config.php file and add a new constant called JWT_AUTH_SECRET_KEY .


define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');

You can use a string from here

Configurate CORs Support

This plugin has the option to enable CORs support.

To enable the 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 the plugin dashboard.


create , json , token , authentication , tutorial ,

Name

Read Article
https://develop.horje.com/learn/1434/reference