mdfaizan7 / go-authentication-boilerplate

An Authentication Server boilerplate made with Go and PostgreSQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GO AUTHENTICATION BOILERPLATE

An Authentication Server boilerplate made with Go and PostgreSQL.

Installation

1. Clone project

git clone https://github.com/mdfaizan7/go-authentication-boilerplate.git

2. cd into the folder

cd go-authentication-boilerplate

3. Start PostgreSQl server

4. Create database called go-auth

createdb go-auth # in bash/zsh

CREATE DATABASE go-auth; # in psql

3. Create env file

You need to start the server with right credentials stored inside .env file.
You can do this with: cp .env.example .env

Usage

You can start the server with go run main.go.
Then the server will start running on http://localhost:3000.

Features

  • Register
  • Login
  • Logout
  • Cookies
  • Access tokens and Refresh Tokens
  • Authentication Middleware

About

An Authentication Server boilerplate made with Go and PostgreSQL.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 99.3%Language:Shell 0.7%