mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
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:
1
packages/global/support/user/api.d.ts
vendored
1
packages/global/support/user/api.d.ts
vendored
@@ -9,6 +9,7 @@ import type { TeamMemberItemType } from './team/type';
|
||||
export type PostLoginProps = {
|
||||
username: string;
|
||||
password: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
export type OauthLoginProps = {
|
||||
|
@@ -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'
|
||||
};
|
||||
|
10
packages/global/support/user/auth/type.d.ts
vendored
Normal file
10
packages/global/support/user/auth/type.d.ts
vendored
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user