From 3c30d55df92dc6b4ea2a7f54639888b01d576a0a Mon Sep 17 00:00:00 2001 From: Aljaz Ceru Date: Thu, 18 Sep 2025 12:25:43 +0200 Subject: [PATCH] fix auth front --- frontend/src/components/providers/auth-provider.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 +}