Add a simple JWT authentication to a React Template
This page explains how to update a React Template to support authentication using the JWT strategy. After the update, the project will have the following features:
Guest users are redirected to authenticate
Users are able to authenticate using a registered account
Users are able to register new accounts
Users are able to logout from the application
The App will use an open-source Node JS Backend published on Github - Product features:
βAPI Definition - the unified API structure implemented by this server
Simple, intuitive codebase - can be extended with ease.
TypeScript, Joy for validation
Stack: NodeJS / Express / SQLite / TypeORM
Auth: Passport / passport-jwt strategy
β
Used Template: Soft UI React
Soft UI Dashboard is an open-source React Dashboard template crafted by Creative-Tim on top of M-UI (ex. Material-UI), the most popular components library for React. The product can be downloaded from the official product page but also directly from Github and compiled in a local environment: