()
| 8 | |
| 9 | class AuthService { |
| 10 | async checkAuthStatus(): Promise<boolean> { |
| 11 | try { |
| 12 | // Check auth status without triggering auth flow |
| 13 | const response = await apiClient.get<{ authenticated: boolean }>( |
| 14 | "/auth/status", |
| 15 | { |
| 16 | skipAuth: true, |
| 17 | } |
| 18 | ); |
| 19 | return response?.authenticated; |
| 20 | } catch (error) { |
| 21 | return false; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | async login(credentials: LoginCredentials): Promise<AuthResponse> { |
| 26 | return apiClient.post<AuthResponse>("/auth/login", credentials, { |