|
|
|
@@ -69,6 +69,7 @@ export const { signIn, signOut, useSession, changePassword } = authClient;
|
|
|
|
|
| TC-AUTH-5.3.1 | Auth client falls back to window.location.origin | Do not set `VITE_API_URL`, load app | Auth client uses `window.location.origin` as base URL |
|
|
|
|
|
| TC-AUTH-5.3.2 | Sign-in on localhost | Load app without `VITE_API_URL` on localhost:3000 | Auth client uses `http://localhost:3000` as base URL |
|
|
|
|
|
| TC-AUTH-5.3.3 | Sign-in on dev environment | Load app without `VITE_API_URL` on `https://dev.groombook.dev` | Auth client uses `https://dev.groombook.dev` as base URL |
|
|
|
|
|
| TC-AUTH-5.3.4 | SSO cookie set after Authentik callback (GRO-1592) | Complete Authentik SSO login on UAT without `VITE_API_URL` set | `__Secure-better-auth.session_token` cookie is present in browser; subsequent `/api/*` calls include the cookie and return 200 |
|
|
|
|
|
|
|
|
|
|
### 5.4 Session Persistence
|
|
|
|
|
|
|
|
|
@@ -77,6 +78,26 @@ export const { signIn, signOut, useSession, changePassword } = authClient;
|
|
|
|
|
| TC-AUTH-5.4.1 | Session persists across page reload | Sign in, reload page | Session remains active |
|
|
|
|
|
| TC-AUTH-5.4.2 | Session clears on sign-out | Sign in, sign out | User is logged out, redirected to login |
|
|
|
|
|
|
|
|
|
|
### 5.4.1 SSO Login Journey (Authentik OIDC end-to-end)
|
|
|
|
|
|
|
|
|
|
| # | Scenario | Steps | Pass Criteria | Fail Criteria |
|
|
|
|
|
|---|----------|-------|---------------|---------------|
|
|
|
|
|
| TC-WEB-SSO-1 | Sign-in page shows SSO button | Navigate to app root URL | Sign-in page displayed with "Sign in with SSO" button visible | No SSO button, 403 before page loads |
|
|
|
|
|
| TC-WEB-SSO-2 | Click SSO redirects to Authentik | Click "Sign in with SSO" button | Browser redirected to Authentik login at auth.farh.net | No redirect, error shown, button does nothing |
|
|
|
|
|
| TC-WEB-SSO-3 | Valid OIDC credentials authenticate | At Authentik, enter valid credentials and authenticate | Redirected back to app with active session | Redirect loop, 403, session not established |
|
|
|
|
|
| TC-WEB-SSO-4 | Post-login dashboard accessible | After SSO flow completes, dashboard loads | Dashboard displays correctly with user identity shown | Blank page, 403, session not active |
|
|
|
|
|
| TC-WEB-SSO-5 | User identity displayed correctly | After SSO login, check header/nav | User name/email/initials shown in nav, role reflected in UI | No user indicator, wrong user shown |
|
|
|
|
|
|
|
|
|
|
### 5.4.2 OOBE Flow Post-Login
|
|
|
|
|
|
|
|
|
|
| # | Scenario | Steps | Pass Criteria | Fail Criteria |
|
|
|
|
|
|---|----------|-------|---------------|---------------|
|
|
|
|
|
| TC-WEB-OOBE-1 | Fresh DB shows setup wizard | On fresh DB (no super user), navigate to app | Setup wizard / OOBE screen displayed | Regular login page shown instead of setup |
|
|
|
|
|
| TC-WEB-OOBE-2 | Configure OIDC via setup | During OOBE, configure OIDC auth provider via /api/setup/auth-provider | OIDC configured successfully, no 403 | 403 during setup, config rejected |
|
|
|
|
|
| TC-WEB-OOBE-3 | Setup completes and redirects | Complete OOBE setup with business name | Redirected to app dashboard as super user, setup bypassed on reload | Setup errors, wrong redirect, setup reappears |
|
|
|
|
|
| TC-WEB-OOBE-4 | Admin panel accessible after setup | After completing OOBE, navigate to admin panel | Admin features accessible | 403 on admin panel, insufficient permissions |
|
|
|
|
|
| TC-WEB-OOBE-5 | SSO login during OOBE does not interfere | During fresh OOBE, attempt SSO login before completing setup | SSO login redirected appropriately, setup can still complete | Auto-provision creates staff prematurely, setup flow broken |
|
|
|
|
|
|
|
|
|
|
### 5.5 Dashboard
|
|
|
|
|
|
|
|
|
|
| # | Scenario | Steps | Expected |
|
|
|
|
|