feat: Initial commit - Base application with Next.js - Configuration, Auth, Library navigation, CBZ/CBR reader, Cache, Responsive design
This commit is contained in:
27
src/types/auth.ts
Normal file
27
src/types/auth.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { KomgaUser } from "./komga";
|
||||
|
||||
export interface AuthConfig {
|
||||
serverUrl: string;
|
||||
credentials?: {
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
isAuthenticated: boolean;
|
||||
user: KomgaUser | null;
|
||||
serverUrl: string | null;
|
||||
}
|
||||
|
||||
export interface AuthError {
|
||||
code: AuthErrorCode;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export type AuthErrorCode =
|
||||
| "INVALID_CREDENTIALS"
|
||||
| "INVALID_SERVER_URL"
|
||||
| "SERVER_UNREACHABLE"
|
||||
| "NETWORK_ERROR"
|
||||
| "UNKNOWN_ERROR";
|
||||
Reference in New Issue
Block a user