-
-
Notifications
You must be signed in to change notification settings - Fork 50
Home
Daniel Kudwien edited this page May 24, 2023
·
5 revisions
We are collecting helpful tips and tutorials from everyone here. If you resolved a question or want to share an integration example with others, please add it here. 🙌
The JWT access token flow with the refresh tokens is:
- Send a request to
/token
with username and password to get a JWT access token (in response body) and refresh token (as cookie). - Send requests to any endpoints passing JWT access token as
Authorization
bearer token. - If JWT expired, send a request to
/token
with refresh token as cookie (instead of username and password) to get a new JWT access token. - If refresh token expired, send a request to
/token/refresh
with refresh token as cookie to get a new refresh token (cookie).
To install from source using a ZIP archive:
- Go to the jwt-auth plugin repository page.
- Click the dropdown button "Code", select the tab "Local", and click "Download ZIP".
- Upload the ZIP file into the
wp-content
folder of your WordPress site and extract it. - Rename the extracted plugin folder into
jwt-auth
. - Delete the ZIP file.
- Open a terminal, change into the plugin folder
wp-content/jwt-auth
and install dependencies using Composer by running the command:composer install --no-dev