Feat: prelogin (#4773)

* add prelogin api (#4762)

* add prelogin api

* move type.d.ts

* perf: prelogin code

* doc

* fix: ts

---------

Co-authored-by: dreamer6680 <1468683855@qq.com>
This commit is contained in:
Archer
2025-05-08 22:09:02 +08:00
committed by GitHub
parent 83d54d046d
commit 12d6948ba7
10 changed files with 179 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import type { TeamMemberItemType } from './team/type';
export type PostLoginProps = {
username: string;
password: string;
code: string;
};
export type OauthLoginProps = {

View File

@@ -3,7 +3,8 @@ export enum UserAuthTypeEnum {
findPassword = 'findPassword',
wxLogin = 'wxLogin',
bindNotification = 'bindNotification',
captcha = 'captcha'
captcha = 'captcha',
login = 'login'
}
export const userAuthTypeMap = {
@@ -11,5 +12,6 @@ export const userAuthTypeMap = {
[UserAuthTypeEnum.findPassword]: 'findPassword',
[UserAuthTypeEnum.wxLogin]: 'wxLogin',
[UserAuthTypeEnum.bindNotification]: 'bindNotification',
[UserAuthTypeEnum.captcha]: 'captcha'
[UserAuthTypeEnum.captcha]: 'captcha',
[UserAuthTypeEnum.login]: 'login'
};

View File

@@ -0,0 +1,10 @@
import type { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
export type UserAuthSchemaType = {
key: string;
type: `${UserAuthTypeEnum}`;
code?: string;
openid?: string;
createTime: Date;
expiredTime: Date;
};