Skip to content

login page created in go with the aim of training my programming knowledge

Notifications You must be signed in to change notification settings

ak7r4/auth-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Login Page Project


Project created to improve my programming skills.
This is a login page that has the following architecture:


image

How to set up your database as the application expects:

CREATE DATABASE golang_api;
USE golang_api;
CREATE TABLE users (
    id INT PRIMARY KEY AUTO_INCREMENT,
    username VARCHAR(50) NOT NULL UNIQUE,
    password VARCHAR(255) NOT NULL
);
CREATE TABLE sessions (
    cookie VARCHAR(255) PRIMARY KEY,
    user_id TEXT,
    expires_at DATETIME,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

.env example:

DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD='root'
DB_DATABASE=golang_api
DB_PORT=3306
SECRET_KEY=Secret_key_to_encrypt_cookies

About

login page created in go with the aim of training my programming knowledge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published