This commit is contained in:
ryan
2026-06-08 14:34:09 +08:00
parent db68a130ce
commit 72c74803be
17 changed files with 596 additions and 58 deletions
@@ -111,6 +111,10 @@ export class AuthService extends BaseService {
return this.post<User>('/user/register', request);
}
static async sendEmailCode(email: string, scene: 'register' | 'login'): Promise<void> {
return this.post<void>('/user/send-email-code', { email, scene });
}
static async changePassword(request: ChangePasswordRequest): Promise<void> {
return this.post<void>('/user/change-password', request);
}
+3
View File
@@ -35,12 +35,15 @@ export interface OAuthCallbackRequest {
export interface LoginRequest {
username: string;
password: string;
code?: string;
}
export interface RegisterRequest {
username: string;
password: string;
nickname?: string;
email?: string;
code?: string;
}
export interface OAuthAuthorizeResponse {
+4
View File
@@ -20,4 +20,8 @@ export interface PublicConfigResponse {
cap_login_enabled: boolean;
/** 是否自动解题 */
cap_auto_solve: boolean;
/** 是否启用邮箱登录验证 */
email_login_verification_enabled: boolean;
/** 是否启用邮箱注册验证 */
email_register_verification_enabled: boolean;
}