mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
feat: add microsoft oauth (#3152)
This commit is contained in:
@@ -56,6 +56,7 @@ export type FastGPTFeConfigsType = {
|
||||
github?: string;
|
||||
google?: string;
|
||||
wechat?: string;
|
||||
microsoft?: string;
|
||||
};
|
||||
limit?: {
|
||||
exportDatasetLimitMinutes?: number;
|
||||
|
@@ -14,5 +14,6 @@ export const userStatusMap = {
|
||||
export enum OAuthEnum {
|
||||
github = 'github',
|
||||
google = 'google',
|
||||
wechat = 'wechat'
|
||||
wechat = 'wechat',
|
||||
microsoft = 'microsoft'
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ export const iconPaths = {
|
||||
'common/list': () => import('./icons/common/list.svg'),
|
||||
'common/loading': () => import('./icons/common/loading.svg'),
|
||||
'common/logLight': () => import('./icons/common/logLight.svg'),
|
||||
'common/microsoft': () => import('./icons/common/microsoft.svg'),
|
||||
'common/monitor': () => import('./icons/common/monitor.svg'),
|
||||
'common/navbar/pluginFill': () => import('./icons/common/navbar/pluginFill.svg'),
|
||||
'common/navbar/pluginLight': () => import('./icons/common/navbar/pluginLight.svg'),
|
||||
|
@@ -0,0 +1 @@
|
||||
<svg t="1731513229844" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5087" width="200" height="200"><path d="M493.0048 492.9536H128.0512V128H493.056v364.9536z" fill="#F1511B" p-id="5088"></path><path d="M895.9488 492.9536H530.944V128H896v364.9536z" fill="#80CC28" p-id="5089"></path><path d="M493.0048 896H128v-364.9024H493.056V896z" fill="#00ADEF" p-id="5090"></path><path d="M895.8976 896h-364.9024v-364.9024h364.9024V896z" fill="#FBBC09" p-id="5091"></path></svg>
|
After Width: | Height: | Size: 512 B |
@@ -997,6 +997,7 @@
|
||||
"support.user.login.Email": "Email",
|
||||
"support.user.login.Github": "GitHub Login",
|
||||
"support.user.login.Google": "Google Login",
|
||||
"support.user.login.Microsoft": "Microsoft Login",
|
||||
"support.user.login.Password": "Password",
|
||||
"support.user.login.Password login": "Password Login",
|
||||
"support.user.login.Phone": "Phone Login",
|
||||
|
@@ -18,9 +18,6 @@
|
||||
"FAQ.switch_package_a": "套餐使用规则为优先使用更高级的套餐,因此,购买的新套餐若比当前套餐更高级,则新套餐立即生效:否则将继续使用当前套餐。",
|
||||
"FAQ.switch_package_q": "是否切换订阅套餐?",
|
||||
"Folder": "文件夹",
|
||||
"just_now": "刚刚",
|
||||
"yesterday": "昨天",
|
||||
"yesterday_detail_time": "昨天 {{time}}",
|
||||
"Login": "登录",
|
||||
"Move": "移动",
|
||||
"Name": "名称",
|
||||
@@ -125,6 +122,7 @@
|
||||
"common.Documents": "文档",
|
||||
"common.Done": "完成",
|
||||
"common.Edit": "编辑",
|
||||
"common.Error": "错误",
|
||||
"common.Exit": "退出",
|
||||
"common.Exit Directly": "直接退出",
|
||||
"common.Expired Time": "过期时间",
|
||||
@@ -194,7 +192,6 @@
|
||||
"common.Update Successful": "更新成功",
|
||||
"common.Username": "用户名",
|
||||
"common.Waiting": "等待中",
|
||||
"common.Error": "错误",
|
||||
"common.Warning": "警告",
|
||||
"common.Website": "网站",
|
||||
"common.all_result": "完整结果",
|
||||
@@ -551,6 +548,7 @@
|
||||
"core.dataset.import.Chunk Range": "范围:{{min}}~{{max}}",
|
||||
"core.dataset.import.Chunk Split": "直接分段",
|
||||
"core.dataset.import.Chunk Split Tip": "将文本按一定的规则进行分段处理后,转成可进行语义搜索的格式,适合绝大多数场景。不需要调用模型额外处理,成本低。",
|
||||
"core.dataset.import.Continue upload": "继续上传",
|
||||
"core.dataset.import.Custom process": "自定义规则",
|
||||
"core.dataset.import.Custom process desc": "自定义设置数据处理规则",
|
||||
"core.dataset.import.Custom prompt": "自定义提示词",
|
||||
@@ -579,11 +577,10 @@
|
||||
"core.dataset.import.Select source": "选择来源",
|
||||
"core.dataset.import.Source name": "来源名",
|
||||
"core.dataset.import.Sources list": "来源列表",
|
||||
"core.dataset.import.Continue upload": "继续上传",
|
||||
"core.dataset.import.Upload complete": "完成上传",
|
||||
"core.dataset.import.Start upload": "开始上传",
|
||||
"core.dataset.import.Total files": "共 {{total}} 个文件",
|
||||
"core.dataset.import.Training mode": "训练模式",
|
||||
"core.dataset.import.Upload complete": "完成上传",
|
||||
"core.dataset.import.Upload data": "确认上传",
|
||||
"core.dataset.import.Upload file progress": "文件上传进度",
|
||||
"core.dataset.import.Upload status": "状态",
|
||||
@@ -894,6 +891,7 @@
|
||||
"is_using": "正在使用",
|
||||
"item_description": "字段描述",
|
||||
"item_name": "字段名",
|
||||
"just_now": "刚刚",
|
||||
"key_repetition": "key 重复",
|
||||
"move.confirm": "确认移动",
|
||||
"navbar.Account": "账号",
|
||||
@@ -998,6 +996,7 @@
|
||||
"support.user.login.Email": "邮箱",
|
||||
"support.user.login.Github": "GitHub 登录",
|
||||
"support.user.login.Google": "Google 登录",
|
||||
"support.user.login.Microsoft": "微软登录",
|
||||
"support.user.login.Password": "密码",
|
||||
"support.user.login.Password login": "密码登录",
|
||||
"support.user.login.Phone": "手机号登录",
|
||||
@@ -1214,5 +1213,7 @@
|
||||
"user.type": "类型",
|
||||
"verification": "验证",
|
||||
"xx_search_result": "{{key}} 的搜索结果",
|
||||
"yes": "是"
|
||||
"yes": "是",
|
||||
"yesterday": "昨天",
|
||||
"yesterday_detail_time": "昨天 {{time}}"
|
||||
}
|
||||
|
@@ -59,6 +59,16 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.oauth?.microsoft
|
||||
? [
|
||||
{
|
||||
label: t('common:support.user.login.Microsoft'),
|
||||
provider: OAuthEnum.microsoft,
|
||||
icon: 'common/microsoft',
|
||||
redirectUrl: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=${feConfigs?.oauth?.microsoft}&response_type=code&redirect_uri=${redirectUri}&response_mode=query&scope=https%3A%2F%2Fgraph.microsoft.com%2Fuser.read&state=${state.current}`
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(pageType !== LoginPageTypeEnum.passwordLogin
|
||||
? [
|
||||
{
|
||||
|
Reference in New Issue
Block a user