Encode, decode, and validate JSON Web Tokens (JWTs) with ease.
This library provides simple and efficient methods for working with JWTs in both JavaScript and TypeScript projects.
See Package's Demo Application or https://jwt-library.vercel.app/
Use NPM Package
NextJS Demo app in jwt-library-demo/client
NPM Package code in jwt-library
First, clone the main repository to your local machine. This repository contains both the JWT library and the demo application.
git clone <repo-url>
Navigate to the jwt-library
directory to install dependencies and build the package.
cd jwt-library
Use npm to install the necessary dependencies:
npm install
To build the TypeScript package to generate JavaScript files in the dist folder.
npm run build
This command compiles TypeScript files into JavaScript and outputs them in the dist directory.
Run tests to ensure everything is working correctly.
npm test
Navigate to the demo application's directory:
cd ../jwt-library-demo/client # from package directory
# or
cd jwt-library-demo/client # from root
Use npm to install the demo app's dependencies:
npm install
Start the Next.js development server to view the demo application in your browser.
npm run dev
Open your browser and go to http://localhost:3000 to view the application.
Feel free to set up the repossitory locally and raise issues & PRs.
Also, if you like the application kindly give the repo a star ⭐.