This commit is contained in:
nora 2025-07-13 12:18:53 +02:00
parent 730cf9d176
commit 34f9302061
10 changed files with 239 additions and 34 deletions

View file

@ -9,7 +9,7 @@
<body>
<h1>Add 2FA to your account</h1>
<a href="/">home</a>
<form method="post" action="/add-totp">
<form method="post">
<p>
Copy this secret into your authenticator app and enter the code from it
below.

View file

@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Login - IDP</title>
<link rel="stylesheet" href="/style.css" />
</head>
<body>
<h1>Log into your beautiful account</h1>
<a href="/">home</a>
<form method="post">
<div>
<label for="totp_code">2FA code</label>
<input id="totp_code" name="totp_code" />
</div>
<button type="submit">Login</button>
{% if error %}
<p>Incorrect 2FA code.</p>
{% endif %}
<!---->
{% if reuse %}
<p>2FA code reused, wait 30s for the next one</p>
{% endif %}
</form>
</body>
</html>

View file

@ -9,7 +9,7 @@
<body>
<h1>Log into your beautiful account</h1>
<a href="/">home</a>
<form method="post" action="/login">
<form method="post">
<div>
<label for="username">Username</label>
<input id="username" name="username" />

View file

@ -9,7 +9,7 @@
<body>
<h1>Create a new account</h1>
<a href="/">home</a>
<form method="post" action="/signup">
<form method="post">
<div>
<label for="username">Username</label>
<input id="username" name="username" />

View file

@ -44,12 +44,12 @@ a[href="/"] {
margin-bottom: 20px;
}
form + :not(.fake-form) {
form:not(.fake-form) {
display: flex;
flex-direction: column;
gap: 10px;
}
.fake-form {
display: inline-block;
display: inline-block;
}