React – How to Logout when Token is expired (JWT)

In previous post, we’ve used JWT for token based authentication (register, login, logout) in that, if token is expired, user cannot access restricted resource and he need to click on Logout button to refresh the UI and login again. This tutorial continues to show you how to force logout user when the Token is expired.

Related Posts:
– In-depth Introduction to JWT-JSON Web Token
– React JWT Authentication (without Redux) example
– React + Redux: JWT Authentication example

Using React Hooks:
Handle JWT Token expiration in React with Hooks

Read More

Axios Tutorial: Get/Post/Put/Delete request example

Axios is a promise-based HTTP Client Javascript library for Node.js and Browser. In this tutorial, we will create examples that use Axios to make Get/Post/Put/Delete request. The final section shows a simple Axios HTTP Client to interact with Rest API.

Related Posts:
– Axios File Upload example
– Axios Interceptors tutorial with Refresh Token example
– Javascript Fetch API tutorial: Get/Post/Put/Delete example
– React Axios example – Get/Post/Put/Delete with Rest API
– React Query and Axios example with Rest API
– Vue Axios example – Get/Post/Put/Delete with Rest API

Read More