oidc example auth

This commit is contained in:
Arian Nasr
2026-02-25 21:27:34 -05:00
parent b7844558ac
commit ea66a750c9
7 changed files with 199 additions and 7 deletions

37
templates/base.html Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}BoxDrop{% endblock %}</title>
<style>
body { font-family: sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
nav { display: flex; justify-content: space-between; align-items: center;
border-bottom: 1px solid #ddd; padding-bottom: 0.75rem; margin-bottom: 2rem; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
.btn { display: inline-block; padding: 0.4rem 1rem; border-radius: 4px;
background: #0066cc; color: #fff; }
.btn:hover { background: #0052a3; text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid #0066cc; color: #0066cc; }
.btn-outline:hover { background: #e8f0fe; }
</style>
</head>
<body>
<nav>
<strong><a href="{{ url_for('index') }}">BoxDrop</a></strong>
<span>
{% if user %}
Signed in as <strong>{{ user.get('name') or user.get('email') }}</strong>
&nbsp;
<a class="btn btn-outline" href="{{ url_for('logout') }}">Log out</a>
{% else %}
<a class="btn" href="{{ url_for('login') }}">Log in with Authentik</a>
{% endif %}
</span>
</nav>
{% block content %}{% endblock %}
</body>
</html>