debug: add detailed logging to login response handling
This commit is contained in:
@@ -56,8 +56,15 @@ export default function LoginPage() {
|
|||||||
password
|
password
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('[LoginPage] Login response received:', {
|
||||||
|
access_token: tokenResponse.access_token?.substring(0, 20),
|
||||||
|
user_id: tokenResponse.user_id,
|
||||||
|
username: tokenResponse.username
|
||||||
|
});
|
||||||
|
|
||||||
// Save JWT token and user info
|
// Save JWT token and user info
|
||||||
saveToken(tokenResponse);
|
saveToken(tokenResponse);
|
||||||
|
console.log('[LoginPage] saveToken called. Checking localStorage:', localStorage.getItem('inventory_token')?.substring(0, 20));
|
||||||
toast.success(`Welcome back, ${tokenResponse.username}`);
|
toast.success(`Welcome back, ${tokenResponse.username}`);
|
||||||
|
|
||||||
// Delay slightly to show toast then redirect
|
// Delay slightly to show toast then redirect
|
||||||
|
|||||||
Reference in New Issue
Block a user