parent
41ede19ee4
commit
d1c10d781d
@ -4,6 +4,8 @@ SECRET_KEY=your_secret_key_here
|
||||
# Yubico API credentials (get from https://upgrade.yubico.com/getapikey/)
|
||||
YUBICO_CLIENT_ID=your_client_id
|
||||
YUBICO_SECRET_KEY=your_secret_key
|
||||
# OPTIONAL: YubiKey instructions for users (eg. "The yubikey attached to my keys")
|
||||
# YUBIKEY_INSTRUCTIONS=
|
||||
|
||||
# Your YubiKey ID (first 12 characters of any OTP generated by your YubiKey)
|
||||
YUBIKEY_ID=ccccccxxxxxx
|
||||
|
@ -129,7 +129,9 @@ def login():
|
||||
except Exception as e:
|
||||
error = f"Authentication error: {str(e)}"
|
||||
|
||||
return render_template("login.html", error=error)
|
||||
custom_instructions = os.getenv("YUBIKEY_INSTRUCTIONS")
|
||||
|
||||
return render_template("login.html", error=error, custom_instructions=custom_instructions)
|
||||
|
||||
@app.route("/logout")
|
||||
def logout():
|
||||
|
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Nathan.Woodburn/</title>
|
||||
<title>Emergency Access</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<link rel="stylesheet" href="/assets/css/index.css">
|
||||
</head>
|
||||
@ -12,7 +12,8 @@
|
||||
<body>
|
||||
<div class="spacer"></div>
|
||||
<div class="centre">
|
||||
<h1>Nathan.Woodburn/</h1>
|
||||
<h1>Retrieve Emergency Information</h1>
|
||||
<p>Access emergency information by logging in with your YubiKey.</p>
|
||||
{% if authenticated %}
|
||||
<p><a href="/emergency">Access Emergency Information</a></p>
|
||||
<p><a href="/logout">Logout</a></p>
|
||||
|
@ -41,7 +41,10 @@
|
||||
<div class="spacer"></div>
|
||||
<div class="centre">
|
||||
<h1>YubiKey Authentication</h1>
|
||||
<p>Please insert your YubiKey and press it to authenticate.</p>
|
||||
<p>Make sure the input field is selected and press your YubiKey to authenticate.</p>
|
||||
{% if custom_instructions %}
|
||||
<p>{{ custom_instructions }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if error %}
|
||||
<div class="error">{{ error }}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user