diff --git a/frontend/src/components/providers/auth-provider.tsx b/frontend/src/components/providers/auth-provider.tsx index 97c2414..7d9e524 100644 --- a/frontend/src/components/providers/auth-provider.tsx +++ b/frontend/src/components/providers/auth-provider.tsx @@ -20,7 +20,7 @@ interface AuthContextType { user: User | null isLoading: boolean isAuthenticated: boolean - login: (username: string, password: string) => Promise + login: (email: string, password: string) => Promise logout: () => void register: (username: string, email: string, password: string) => Promise refreshToken: () => Promise @@ -62,9 +62,9 @@ export function AuthProvider({ children }: { children: React.ReactNode }) { } } - const login = async (username: string, password: string) => { + const login = async (email: string, password: string) => { try { - const data = await apiClient.post("/api-internal/v1/auth/login", { username, password }) + const data = await apiClient.post("/api-internal/v1/auth/login", { email, password }) // Store tokens using tokenManager tokenManager.setTokens(data.access_token, data.refresh_token) @@ -124,4 +124,4 @@ export function AuthProvider({ children }: { children: React.ReactNode }) { } return {children} -} \ No newline at end of file +}