After successful MFA code verification, onMfaVerified() called authStore.initialize() which returned immediately (isInitialized was already true from the initial page load). The auth store was never populated with user data, so the router guard saw isAuthenticated === false and redirected back to /login — leaving the user stuck on the MFA challenge screen with a consumed session. Fix: use authStore.refreshUser() instead of initialize(). This always calls GET /auth/me (using the new auth cookie from the MFA verify response), populates the store, and then navigation to the dashboard succeeds. The portal login already uses authStore.fetchUser() which has no isInitialized guard, so it was not affected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Crewli — Organizer SPA
Main product UI for organisation and event staff (Vue 3 + Vuexy + Vuetify). Lives in this repo; only re-copy from Vuexy when upgrading the template.
Setup
- Install dependencies:
pnpm install
- Create
.env.local:
VITE_API_URL=http://localhost:8000/api/v1
VITE_APP_NAME="Crewli Organizer"
- Dev server uses port 5174 (see
vite.config.tsor run from repo root:make app).
pnpm dev --port 5174
Port
Runs on http://localhost:5174
Production: e.g. VITE_API_URL=https://api.crewli.app/api/v1 and host the SPA at https://crewli.app (see api/.env.example for FRONTEND_APP_URL and SANCTUM_STATEFUL_DOMAINS).