The project is composed of the following files:
- generateSignature.ts: Contains the
generateSignaturefunction responsible for generating the token signature. - sign.ts: Exports the
signfunction, which creates a signed JWT token based on the provided data. - verify.ts: Exports the
verifyfunction, which validates and decodes a JWT token.
Make sure you have Node.js and TypeScript installed. Clone the repository and install the dependencies:
git clone https://github.com/renanholler/JWT-Token-Implementation.git
cd JWT-Token-Implementation
npm install