Categorygithub.com/0xMarvell/go-jwt-auth-implementation
module
0.0.0-20230608101232-5883ac7a4633
Repository: https://github.com/0xmarvell/go-jwt-auth-implementation.git
Documentation: pkg.go.dev

# README

Go-JWT-Auth-Implementation

Implementation of a simple authentication system using JWT (JSON Web Tokens). The API generates a token which will be used to authenticate the user. The token is then stored in an httpOnly cookie for security purposes, as opposed to storing the token in local storage.

The API was built using the following tools:

DOCS

Read the documentation here

Environment Variables

This project makes use of the godotenv package to store environment variables. To run this project on your local machine, you will need to add your Postgres database details as environment variables. This article explains how to use the package.

An .env.example file has been provided to help with setting up your environment variables.

Run API locally

  • Clone Repo

    $ git clone https://github.com/0xMarvell/go-jwt-auth-implementation.git
    
  • Make sure to have Go installed on your local machine

  • Open the code base directory in terminal

  • Launch API server:

    $ go build -o auth cmd/web/main.go
    $ ./auth
    

Test API using Postman, Insomnia or any other API testing client of your choice

# Packages

No description provided by the author
No description provided by the author