feat(auth): Refactor mobile authentication config to support whitelist functionality

This commit is contained in:
web@ppanel
2025-02-14 22:13:50 +07:00
parent 5bac933fbc
commit c761ec7538
12 changed files with 92 additions and 49 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';
+14 -4
View File
@@ -68,7 +68,7 @@ declare namespace API {
type AuthConfig = {
mobile: MobileAuthenticateConfig;
email: EmailAuthticateConfig;
register: RegisterConfig;
register: PubilcRegisterConfig;
};
type AuthMethodConfig = {
@@ -768,9 +768,8 @@ declare namespace API {
type MobileAuthenticateConfig = {
enable: boolean;
limit: number;
interval: number;
expire_time: number;
enable_whitelist: boolean;
whitelist: string[];
};
type NodeConfig = {
@@ -876,6 +875,17 @@ declare namespace API {
list: PlatformInfo[];
};
type PubilcRegisterConfig = {
stop_register: boolean;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;
};
type PubilcVerifyCodeConfig = {
verify_code_interval: number;
};
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';
+15 -5
View File
@@ -66,7 +66,7 @@ declare namespace API {
type AuthConfig = {
mobile: MobileAuthenticateConfig;
email: EmailAuthticateConfig;
register: RegisterConfig;
register: PubilcRegisterConfig;
};
type AuthMethodConfig = {
@@ -152,7 +152,7 @@ declare namespace API {
invite: InviteConfig;
currency: CurrencyConfig;
subscribe: SubscribeConfig;
verify_code: VerifyCodeConfig;
verify_code: PubilcVerifyCodeConfig;
oauth_methods: string[];
};
@@ -208,9 +208,8 @@ declare namespace API {
type MobileAuthenticateConfig = {
enable: boolean;
limit: number;
interval: number;
expire_time: number;
enable_whitelist: boolean;
whitelist: string[];
};
type NodeConfig = {
@@ -310,6 +309,17 @@ declare namespace API {
enable: boolean;
};
type PubilcRegisterConfig = {
stop_register: boolean;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;
};
type PubilcVerifyCodeConfig = {
verify_code_interval: number;
};
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;