oa-email-code-login 实现邮箱验证码登录
这个提交包含在:
@@ -1,4 +1,5 @@
|
||||
import { apiRequestData } from "../api/http";
|
||||
import { verifyEmailLoginCode } from "../api/auth";
|
||||
import type { LoginRequest, LoginResponse, MeResponse } from "../api/types";
|
||||
import { getDeviceFingerprint } from "./deviceFingerprint";
|
||||
|
||||
@@ -32,6 +33,11 @@ export async function loginWithPassword(payload: LoginRequest) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function loginWithEmailCode(payload: { email: string; code: string }) {
|
||||
resetRefreshSessionCache();
|
||||
return verifyEmailLoginCode(payload);
|
||||
}
|
||||
|
||||
async function requestRefreshSession() {
|
||||
return apiRequestData<LoginResponse>("/api/auth/refresh", {
|
||||
method: "POST",
|
||||
|
||||
在新工单中引用
屏蔽一个用户