inital
This commit is contained in:
28
frontend/src/types/auth.types.ts
Normal file
28
frontend/src/types/auth.types.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
given_name: string;
|
||||
family_name: string;
|
||||
preferred_username?: string;
|
||||
groups?: string[];
|
||||
}
|
||||
|
||||
export interface AuthTokens {
|
||||
token: string;
|
||||
refreshToken?: string;
|
||||
expiresIn?: number;
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
user: User | null;
|
||||
token: string | null;
|
||||
isAuthenticated: boolean;
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
export interface AuthContextType extends AuthState {
|
||||
login: (code: string) => Promise<void>;
|
||||
logout: () => void;
|
||||
refreshAuth: () => Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user