Skip to content

Access / Refresh token Authentication with token reuse detection, based on Browser / Network change.

Notifications You must be signed in to change notification settings

repovic/basic-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

JWT Basic Authentication

Access / Refresh token Authentication with token reuse detection, based on Browser / Network change. Built with Apollo GraphQL(Express) and MongoDB. Built as EXAMPLE / BOILERPLATE.

Getting started:

  1. step: Clone repository:
git clone https://github.com/repovic/basic-authentication
  1. step: Install required NPM packages:
cd ./basic-authentication/server && npm install
  1. step: Configure ENV variables, create ENV file in the following path:
/server/source/environment/.env.development
  1. step: ENV Sample:
MONGODB_CONNECTION_STRING =

ACCESS_TOKEN_SECRET =
REFRESH_TOKEN_SECRET =

ACCESS_TOKEN_EXPIRE = 5s
REFRESH_TOKEN_EXPIRE = 7d

REFRESH_TOKEN_COOKIE_EXPIRE = 604800000
# 60 * 60 * 24 * 7 * 1000 - 7 days (ms)
  1. step: Start the application:
npm run dev
  1. step: Once started, Apollo Studio Explorer is live at: http://localhost:5555/graphql, by default.

About

Access / Refresh token Authentication with token reuse detection, based on Browser / Network change.

Topics

Resources

Stars

Watchers

Forks