Refactor authentication system with tier-based access control
All checks were successful
Build And Push Image / docker (push) Successful in 2m59s

- Replace group-based auth with user/board/admin tier system
- Add direct login functionality alongside OAuth
- Implement role-based middleware for route protection
- Create dashboard pages and admin API endpoints
- Add error handling page and improved user management
- Maintain backward compatibility with legacy role methods
This commit is contained in:
2025-08-07 12:28:41 +02:00
parent 2c2c0f5c33
commit cd29123e23
15 changed files with 1893 additions and 57 deletions

View File

@@ -3,8 +3,11 @@ export interface User {
id: string;
email: string;
name: string;
groups?: string[];
tier?: string;
firstName?: string;
lastName?: string;
username?: string;
tier: 'user' | 'board' | 'admin';
groups: string[];
}
export interface AuthState {
@@ -60,23 +63,19 @@ export interface UserInfo {
given_name?: string;
family_name?: string;
name?: string;
preferred_username?: string;
groups?: string[];
tier?: string;
}
export interface SessionData {
user: {
id: string;
email: string;
name: string;
groups?: string[];
tier?: string;
};
user: User;
tokens: {
accessToken: string;
refreshToken: string;
expiresAt: number;
};
rememberMe?: boolean;
createdAt: number;
lastActivity: number;
}