Refactor authentication system with tier-based access control
All checks were successful
Build And Push Image / docker (push) Successful in 2m59s
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user