Mrkouhadi / go-jwt

A guideline of how to use JWT with Golang and Reactjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DESCRIPTION: an authentication service using Go-chi and Jwt.

  • THis application is build in Go, Go-chi and jwt + Reactjs for the client side.
  • Jwt tokens are being stored in httpOnly cookies after being encrypted with AES-GCM.
  • When the access token is expired, it gets automatically refereshed by the middleware if the refersh token is still not expired.

INSTRUCTIONS:

  • Add an .env file in server directory and add: SECRET_JWT_KEY="your secret key" & AES_SECRECT_KEY="Your secret key"
  • To run the frontend: make frontend
  • To run the backend: make backend

SCREENSHOTS:

Login page: Login page Profile page: Profile page

About

A guideline of how to use JWT with Golang and Reactjs


Languages

Language:Go 69.8%Language:TypeScript 21.9%Language:Dockerfile 4.0%Language:CSS 1.9%Language:Makefile 1.8%Language:JavaScript 0.7%