Integrate AuthInitializer component to restore authentication state on app load and enhance User type to align with OpenAPI spec.

This commit is contained in:
2025-11-02 05:59:00 +01:00
parent 29ff97f726
commit 4885df80a7
4 changed files with 55 additions and 3 deletions

View File

@@ -6,14 +6,20 @@
import { create } from 'zustand';
import { saveTokens, getTokens, clearTokens } from '@/lib/auth/storage';
// User type - will be replaced with generated types in Phase 2
/**
* User type matching backend UserResponse
* Aligns with generated API types from OpenAPI spec
*/
export interface User {
id: string;
email: string;
full_name?: string;
first_name: string;
last_name?: string | null;
phone_number?: string | null;
is_active: boolean;
is_superuser: boolean;
organization_id?: string;
created_at: string;
updated_at?: string | null;
}
interface AuthState {