Fix biometric auth TypeScript errors
- Add LOGIN_BIOMETRIC to AuditAction enum - Import AuditAction and EntityType in AuthService - Fix loginWithExternalAuth return type to match AuthResponse interface - Update biometric API client to use correct response structure - Update login page to access tokens from nested data structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ export default function LoginPage() {
|
||||
);
|
||||
|
||||
// Store tokens and navigate
|
||||
tokenStorage.setTokens(result.tokens.accessToken, result.tokens.refreshToken);
|
||||
tokenStorage.setTokens(result.data.tokens.accessToken, result.data.tokens.refreshToken);
|
||||
router.push('/');
|
||||
} catch (err: any) {
|
||||
console.error('Biometric login failed:', err);
|
||||
|
||||
@@ -76,7 +76,7 @@ export const biometricApi = {
|
||||
response: any,
|
||||
email?: string,
|
||||
deviceInfo?: { deviceId: string; platform: string }
|
||||
): Promise<{ success: boolean; message: string; user: any; tokens: any }> {
|
||||
): Promise<{ success: boolean; data: { user: any; tokens: any; deviceRegistered: boolean; deviceTrusted: boolean } }> {
|
||||
const verifyResponse = await axios.post(
|
||||
`${API_BASE_URL}/api/v1/auth/biometric/authenticate/verify`,
|
||||
{ response, email, deviceInfo }
|
||||
|
||||
Reference in New Issue
Block a user