diff --git a/backend/app/api/v1/__pycache__/routes_auth.cpython-313.pyc b/backend/app/api/v1/__pycache__/routes_auth.cpython-313.pyc index 4eb388e..112e3ec 100644 Binary files a/backend/app/api/v1/__pycache__/routes_auth.cpython-313.pyc and b/backend/app/api/v1/__pycache__/routes_auth.cpython-313.pyc differ diff --git a/backend/app/api/v1/routes_auth.py b/backend/app/api/v1/routes_auth.py index 5e5c10b..0ee1b0f 100644 --- a/backend/app/api/v1/routes_auth.py +++ b/backend/app/api/v1/routes_auth.py @@ -150,7 +150,9 @@ async def refresh_token( return RefreshResponse( access_token=new_access_token, user_id=user_id, - role=user.role if isinstance(user.role, str) else user.role.value + role=user.role if isinstance(user.role, str) else user.role.value, + email=user.email, + full_name=user.full_name ) except Exception as e: diff --git a/backend/app/schemas/__pycache__/auth.cpython-313.pyc b/backend/app/schemas/__pycache__/auth.cpython-313.pyc index e25bb99..aba36ac 100644 Binary files a/backend/app/schemas/__pycache__/auth.cpython-313.pyc and b/backend/app/schemas/__pycache__/auth.cpython-313.pyc differ diff --git a/backend/app/schemas/auth.py b/backend/app/schemas/auth.py index 82b972f..de0d77b 100644 --- a/backend/app/schemas/auth.py +++ b/backend/app/schemas/auth.py @@ -18,6 +18,10 @@ class LoginResponse(BaseModel): class RefreshResponse(BaseModel): access_token: str token_type: str = "bearer" + user_id: str + role: str + email: str + full_name: str class LogoutResponse(BaseModel): diff --git a/frontend/src/lib/auth.ts b/frontend/src/lib/auth.ts index 95aab6a..58052d2 100644 --- a/frontend/src/lib/auth.ts +++ b/frontend/src/lib/auth.ts @@ -53,8 +53,8 @@ export const useAuthStore = create((set) => ({ // Reconstruct user from refresh response const user: User = { id: response.user_id, - email: '', // Will be populated if needed - full_name: '', + email: response.email, + full_name: response.full_name, role: response.role as UserRole, is_active: true, created_at: '', diff --git a/frontend/src/types/api.ts b/frontend/src/types/api.ts index bf0e7a1..5dc04a8 100644 --- a/frontend/src/types/api.ts +++ b/frontend/src/types/api.ts @@ -98,6 +98,8 @@ export interface RefreshResponse { token_type: string; user_id: string; role: string; + email: string; + full_name: string; } export interface JobCreateRequest {