This is a basic implementation of JWT authentication in Golang. It uses the github.com/golang-jwt/jwt/v5
library for JWT token generation and validation.
.env
setup:
PUBLIC_HOST=localhost
PORT=8080
DB_NAME=app.db
JWT_EXP=604800
JWT_SECRET=secret
To Run Tests:
make test
To Run the Server:
make run