mirror of
https://github.com/Noratrieb/oh-oh.git
synced 2026-01-14 17:15:02 +01:00
2fa
This commit is contained in:
parent
730cf9d176
commit
34f9302061
10 changed files with 239 additions and 34 deletions
|
|
@ -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.
|
||||
|
|
|
|||
29
idp/templates/login-2fa.html
Normal file
29
idp/templates/login-2fa.html
Normal 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>
|
||||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue