Replace L2 JWT auth with OAuth SSO via account.rose-ash.com

- config.py: OAuth settings replace l2_server/l2_domain
- auth.py: full rewrite — login/callback/logout with itsdangerous
  signed state cookies and httpx token exchange
- dependencies.py: remove l2_server assignment, fix redirect path
- home.py: simplify /login to redirect to /auth/login
- base.html: cross-app nav (Blog, Market, Account) + Rose Ash branding
- requirements.txt: add itsdangerous

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-23 23:26:17 +00:00
parent ca4e86d07e
commit 49097eef53
6 changed files with 136 additions and 133 deletions

View File

@@ -1,6 +1,10 @@
{% extends "_base.html" %}
{% block brand %}Art-DAG L1{% endblock %}
{% block brand %}
<a href="https://blog.rose-ash.com/" class="text-white hover:text-gray-200 no-underline">Rose Ash</a>
<span class="text-gray-500 mx-1">|</span>
Art-DAG
{% endblock %}
{% block nav_items %}
<nav class="flex items-center space-x-6">
@@ -10,6 +14,10 @@
<a href="/media" class="text-gray-300 hover:text-white {% if active_tab == 'media' %}text-white font-medium{% endif %}">Media{% if nav_counts and nav_counts.media %} ({{ nav_counts.media }}){% endif %}</a>
<a href="/storage" class="text-gray-300 hover:text-white {% if active_tab == 'storage' %}text-white font-medium{% endif %}">Storage{% if nav_counts and nav_counts.storage %} ({{ nav_counts.storage }}){% endif %}</a>
<a href="/download/client" class="text-gray-300 hover:text-white" title="Download CLI client">Client</a>
<span class="text-gray-600">|</span>
<a href="https://blog.rose-ash.com/" class="text-gray-400 hover:text-white text-sm">Blog</a>
<a href="https://market.rose-ash.com/" class="text-gray-400 hover:text-white text-sm">Market</a>
<a href="https://account.rose-ash.com/" class="text-gray-400 hover:text-white text-sm">Account</a>
</nav>
{% endblock %}
@@ -20,6 +28,6 @@
<a href="/auth/logout" class="text-gray-300 hover:text-white">Logout</a>
</div>
{% else %}
<a href="/login" class="text-gray-300 hover:text-white">Login</a>
<a href="/auth/login" class="text-gray-300 hover:text-white">Login</a>
{% endif %}
{% endblock %}