🐛 fix(oauth): Refactor OAuth configuration types and update related API methods

This commit is contained in:
web@ppanel
2025-01-19 22:34:12 +07:00
parent 18ee600836
commit 6227ba91d0
8 changed files with 201 additions and 163 deletions
+11 -11
View File
@@ -19,6 +19,7 @@ declare namespace API {
};
type ApplicationConfig = {
encryption: boolean;
domains: string[];
startup_picture: string;
startup_picture_skip_time: number;
@@ -210,21 +211,20 @@ declare namespace API {
method: string;
};
type OAuthConfig = {
id: number;
platform: 'github' | 'google' | 'apple' | 'qq' | 'wechat' | 'telegram' | 'facebook';
team_id: string;
key_id: string;
client_id: string;
client_secret: string;
redirect: string;
enabled: boolean;
};
type OAuthLoginResponse = {
redirect: string;
};
type OAuthMethod = {
id: number;
platform: string;
config: Record<string, any>;
redirect: string;
enabled: boolean;
created_at: number;
updated_at: number;
};
type OnlineUser = {
uid: number;
ip: string;