Files
Charon/frontend/src/context/AuthContextValue.ts
Wikid82 a00dea5419 feat: normalize email addresses to lowercase in user registration and profile updates
- Updated user registration and profile update handlers to convert email addresses to lowercase before saving to the database.
- Added integration tests to verify login functionality after email changes, ensuring case insensitivity.
- Introduced a new Account page to replace the Security page, consolidating user account management features.
- Removed the old Security page and updated routing in the Settings layout.
- Enhanced the SystemStatus component to provide user feedback on update availability.
- Added password change functionality in the Account page, allowing users to update their passwords securely.
2025-11-21 13:04:49 -05:00

20 lines
459 B
TypeScript

import { createContext } from 'react';
export interface User {
user_id: number;
role: string;
name?: string;
email?: string;
}
export interface AuthContextType {
user: User | null;
login: () => Promise<void>;
logout: () => void;
changePassword: (oldPassword: string, newPassword: string) => Promise<void>;
isAuthenticated: boolean;
isLoading: boolean;
}
export const AuthContext = createContext<AuthContextType | undefined>(undefined);