mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
fix: await logout before navigating, prevent cancelled fetch
- Logout is now async — awaits sidecar /auth/logout before clearing tokens
- confirmSignOut awaits logout() before navigate('/login')
- 5 second timeout on logout fetch to prevent indefinite hang
- Added console.warn on logout failure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,9 +132,9 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
|
||||
setLogoutOpen(true);
|
||||
};
|
||||
|
||||
const confirmSignOut = () => {
|
||||
const confirmSignOut = async () => {
|
||||
setLogoutOpen(false);
|
||||
logout();
|
||||
await logout();
|
||||
navigate('/login');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user