From 1371b2d4a37d744340004d87632832f1f0ed24e1 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Sun, 19 Nov 2023 14:09:10 +0000 Subject: [PATCH] Fully updated login --- README.md | 12 ++++++------ login/login.py | 2 +- login/templates/index.html | 2 +- requirements.txt | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0573349..dda8a2b 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,15 @@ A frontend and registration service for the maddy mail server ## Setup +Install everything in requirements.txt + Copy config.ini.example to config.ini and edit accordingly Use your web server to host everything in public, and run app.py with python. -Reverse-proxy app.py to /register. +Reverse-proxy signup/signup.py to /register, and run as an a normal user with doas permissions for maddy + +Reverse-proxy login/login.py to /login, and run as the maddy user to have r/w access to the db ## Dependencies @@ -16,8 +20,4 @@ System Any HTTP web server Python3 - -PIP - -Flask -Waitress +Pip diff --git a/login/login.py b/login/login.py index 65db92c..d11cb0d 100644 --- a/login/login.py +++ b/login/login.py @@ -37,7 +37,7 @@ def verify_bcrypt(passphrase, hashed_password): def index(): return render_template('index.html') -@app.route('/login', methods=['POST']) +@app.route('/api', methods=['POST']) def login(): key_to_fetch = request.form['email'] password_to_check = request.form['password'] diff --git a/login/templates/index.html b/login/templates/index.html index f0bb4d6..4aa0e71 100644 --- a/login/templates/index.html +++ b/login/templates/index.html @@ -8,7 +8,7 @@
HectaMail Sign up - Login + Login

Login to your Email Account

diff --git a/requirements.txt b/requirements.txt index cd9f770..3f71424 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ flask waitress captcha +bcrypt