feat: explain expired admin sessions
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-11 13:24:27 -04:00
parent 7786671c00
commit f1190fa806
3 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -1,10 +1,11 @@
<script setup>
import { nextTick, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useAuth } from '@/composables/useAuth.js';
const router = useRouter();
const route = useRoute();
const { signIn, isLoading, error } = useAuth();
const email = ref('');
const password = ref('');
@@ -32,6 +33,7 @@ async function submit() {
<form class="auth-panel" @submit.prevent="submit">
<p class="catalog-kicker">Private workspace</p>
<h1>Sign in</h1>
<p v-if="route.query.reason === 'session-expired'" class="state state--error" role="alert" tabindex="-1">Your session expired. Sign in again to continue.</p>
<p class="detail-notes">Manage your collection, images, and listings.</p>
<label class="fixture-label" for="admin-email">Email</label>
<input id="admin-email" v-model="email" class="fixture-input" type="email" autocomplete="username" required />
+2 -2
View File
@@ -45,5 +45,5 @@ const auth = useAuth();
router.beforeEach(async (to) => {
if (!to.path.startsWith('/admin')) return true;
if (!auth.isAuthenticated.value) await auth.load();
return auth.isAuthenticated.value ? true : { name: 'login' };
});
return auth.isAuthenticated.value ? true : { name: 'login', query: { reason: 'session-expired' } };
});
+1
View File
@@ -277,6 +277,7 @@ Remaining roadmap areas are approved external provider credentials/adapters, bro
- Login errors now move focus to the announced error message so failed authentication is immediately available to keyboard and assistive-technology users.
- Login error focus behavior now has Storybook interaction coverage using a deterministic failed-authentication response.
- Admin logout now exposes a busy state and disables repeat activation while the session is being revoked.
- Expired admin sessions now redirect to login with an accessible explanation that prompts the user to sign in again.
## Local Commands