{# app/templates/admin/test-auth-flow.html #} {% extends 'admin/base.html' %} {% from 'shared/macros/headers.html' import page_header %} {% block title %}Auth Flow Testing{% endblock %} {% block content %}
Change logging verbosity for login.js and api-client.js
Current: LOGIN = 4, API = 3
Tests complete login flow from scratch with no existing tokens.
Expected: Single redirect /admin -> /admin/login, no loops
Tests that login works correctly and redirects to dashboard.
Expected: Token stored, redirect to /admin/dashboard
Tests that refreshing dashboard works without redirect loops.
Expected: No redirect to login, stats load correctly
Tests that expired tokens are handled gracefully.
Expected: 401 response, redirect to login, no loops
Tests accessing dashboard without token redirects to login.
Expected: Redirect to /admin/login, no API calls
Tests visiting login page while already authenticated.
Expected: Token cleared, form displayed, no loops