Added in a password field for login. need to add encryption sometime

This commit is contained in:
2025-07-09 10:05:12 -06:00
parent 30ba75ead8
commit cfe64b1c4c
3 changed files with 265 additions and 47 deletions

View File

@@ -163,6 +163,18 @@
>
</div>
<div class="form-group">
<label for="password">Password</label>
<input
type="password"
id="password"
name="password"
placeholder="Enter your password"
required
autocomplete="current-password"
>
</div>
<button type="submit" class="login-button" id="login-button">
Sign In
</button>
@@ -180,6 +192,7 @@
e.preventDefault();
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
const button = document.getElementById('login-button');
const errorMessage = document.getElementById('error-message');
const successMessage = document.getElementById('success-message');
@@ -198,7 +211,7 @@
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ email }),
body: JSON.stringify({ email, password }),
credentials: 'include'
});