Fully updated login

This commit is contained in:
Tracker-Friendly 2023-11-19 14:09:10 +00:00
parent f417908bc4
commit 1371b2d4a3
4 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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']

View File

@ -8,7 +8,7 @@
<div class="headerbar">
<a href="/">HectaMail</a>
<a href="/register">Sign up</a>
<a class="main" href="/login">Login</a>
<a class="main" href="/login/api">Login</a>
</div>
<div class="content">
<h1>Login to your Email Account</h1>

View File

@ -1,3 +1,4 @@
flask
waitress
captcha
bcrypt