https://github.com/du-disk/jwt-refresh-token
POC JWT Refresh Token
https://github.com/du-disk/jwt-refresh-token
Last synced: 29 days ago
JSON representation
POC JWT Refresh Token
- Host: GitHub
- URL: https://github.com/du-disk/jwt-refresh-token
- Owner: du-disk
- Created: 2022-01-10T02:22:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T03:58:34.000Z (over 4 years ago)
- Last Synced: 2025-01-07T23:47:49.026Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NODE JS - JWT REFRESH TOKEN
Implementation Refresh Token Using [Json Web Token](https://jwt.io/)

## Installation 🚀
Use the [git](https://git-scm.com/) to clone this repository.
```bash
git clone https://github.com/du-disk/jwt-refresh-token.git
```
Go to the project directory
```bash
cd jwt-refresh-token
```
Install dependencies
```bash
yarn install
```
with npm
```bash
npm install
```
## Setup .env file
Rename `.env-example to` `.env` and set variable as your environment
```ini
NODE_PORT=3000
NODE_TOKEN_LIFE=9000
NODE_REFRESH_TOKEN_LIFE=86400
NODE_SECRET_KEY=secret-key
NODE_REFRESH_SECRET_KEY=refresh-secret-key
```
## Available Scripts
To run app as development, run the following command
```bash
yarn start
```
Test
```bash
yarn test
```
## License
[MIT](https://choosealicense.com/licenses/mit/)