Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
0c9e10dd
authored
Nov 14, 2024
by
heheer
Committed by
GitHub
Nov 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add microsoft oauth (#3152)
parent
0472dc29
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
8 deletions
+25
-8
packages/global/common/system/types/index.d.ts
+1
-0
packages/global/support/user/constant.ts
+2
-1
packages/web/components/common/Icon/constants.ts
+1
-0
packages/web/components/common/Icon/icons/common/microsoft.svg
+2
-0
packages/web/i18n/en/common.json
+1
-0
packages/web/i18n/zh/common.json
+8
-7
projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx
+10
-0
No files found.
packages/global/common/system/types/index.d.ts
View file @
0c9e10dd
...
@@ -56,6 +56,7 @@ export type FastGPTFeConfigsType = {
...
@@ -56,6 +56,7 @@ export type FastGPTFeConfigsType = {
github
?:
string
;
github
?:
string
;
google
?:
string
;
google
?:
string
;
wechat
?:
string
;
wechat
?:
string
;
microsoft
?:
string
;
};
};
limit
?:
{
limit
?:
{
exportDatasetLimitMinutes
?:
number
;
exportDatasetLimitMinutes
?:
number
;
...
...
packages/global/support/user/constant.ts
View file @
0c9e10dd
...
@@ -14,5 +14,6 @@ export const userStatusMap = {
...
@@ -14,5 +14,6 @@ export const userStatusMap = {
export
enum
OAuthEnum
{
export
enum
OAuthEnum
{
github
=
'github'
,
github
=
'github'
,
google
=
'google'
,
google
=
'google'
,
wechat
=
'wechat'
wechat
=
'wechat'
,
microsoft
=
'microsoft'
}
}
packages/web/components/common/Icon/constants.ts
View file @
0c9e10dd
...
@@ -50,6 +50,7 @@ export const iconPaths = {
...
@@ -50,6 +50,7 @@ export const iconPaths = {
'common/list'
:
()
=>
import
(
'./icons/common/list.svg'
),
'common/list'
:
()
=>
import
(
'./icons/common/list.svg'
),
'common/loading'
:
()
=>
import
(
'./icons/common/loading.svg'
),
'common/loading'
:
()
=>
import
(
'./icons/common/loading.svg'
),
'common/logLight'
:
()
=>
import
(
'./icons/common/logLight.svg'
),
'common/logLight'
:
()
=>
import
(
'./icons/common/logLight.svg'
),
'common/microsoft'
:
()
=>
import
(
'./icons/common/microsoft.svg'
),
'common/monitor'
:
()
=>
import
(
'./icons/common/monitor.svg'
),
'common/monitor'
:
()
=>
import
(
'./icons/common/monitor.svg'
),
'common/navbar/pluginFill'
:
()
=>
import
(
'./icons/common/navbar/pluginFill.svg'
),
'common/navbar/pluginFill'
:
()
=>
import
(
'./icons/common/navbar/pluginFill.svg'
),
'common/navbar/pluginLight'
:
()
=>
import
(
'./icons/common/navbar/pluginLight.svg'
),
'common/navbar/pluginLight'
:
()
=>
import
(
'./icons/common/navbar/pluginLight.svg'
),
...
...
packages/web/components/common/Icon/icons/common/microsoft.svg
0 → 100644
View file @
0c9e10dd
<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>
\ No newline at end of file
packages/web/i18n/en/common.json
View file @
0c9e10dd
...
@@ -997,6 +997,7 @@
...
@@ -997,6 +997,7 @@
"support.user.login.Email"
:
"Email"
,
"support.user.login.Email"
:
"Email"
,
"support.user.login.Github"
:
"GitHub Login"
,
"support.user.login.Github"
:
"GitHub Login"
,
"support.user.login.Google"
:
"Google Login"
,
"support.user.login.Google"
:
"Google Login"
,
"support.user.login.Microsoft"
:
"Microsoft Login"
,
"support.user.login.Password"
:
"Password"
,
"support.user.login.Password"
:
"Password"
,
"support.user.login.Password login"
:
"Password Login"
,
"support.user.login.Password login"
:
"Password Login"
,
"support.user.login.Phone"
:
"Phone Login"
,
"support.user.login.Phone"
:
"Phone Login"
,
...
...
packages/web/i18n/zh/common.json
View file @
0c9e10dd
...
@@ -18,9 +18,6 @@
...
@@ -18,9 +18,6 @@
"FAQ.switch_package_a"
:
"套餐使用规则为优先使用更高级的套餐,因此,购买的新套餐若比当前套餐更高级,则新套餐立即生效:否则将继续使用当前套餐。"
,
"FAQ.switch_package_a"
:
"套餐使用规则为优先使用更高级的套餐,因此,购买的新套餐若比当前套餐更高级,则新套餐立即生效:否则将继续使用当前套餐。"
,
"FAQ.switch_package_q"
:
"是否切换订阅套餐?"
,
"FAQ.switch_package_q"
:
"是否切换订阅套餐?"
,
"Folder"
:
"文件夹"
,
"Folder"
:
"文件夹"
,
"just_now"
:
"刚刚"
,
"yesterday"
:
"昨天"
,
"yesterday_detail_time"
:
"昨天 {{time}}"
,
"Login"
:
"登录"
,
"Login"
:
"登录"
,
"Move"
:
"移动"
,
"Move"
:
"移动"
,
"Name"
:
"名称"
,
"Name"
:
"名称"
,
...
@@ -125,6 +122,7 @@
...
@@ -125,6 +122,7 @@
"common.Documents"
:
"文档"
,
"common.Documents"
:
"文档"
,
"common.Done"
:
"完成"
,
"common.Done"
:
"完成"
,
"common.Edit"
:
"编辑"
,
"common.Edit"
:
"编辑"
,
"common.Error"
:
"错误"
,
"common.Exit"
:
"退出"
,
"common.Exit"
:
"退出"
,
"common.Exit Directly"
:
"直接退出"
,
"common.Exit Directly"
:
"直接退出"
,
"common.Expired Time"
:
"过期时间"
,
"common.Expired Time"
:
"过期时间"
,
...
@@ -194,7 +192,6 @@
...
@@ -194,7 +192,6 @@
"common.Update Successful"
:
"更新成功"
,
"common.Update Successful"
:
"更新成功"
,
"common.Username"
:
"用户名"
,
"common.Username"
:
"用户名"
,
"common.Waiting"
:
"等待中"
,
"common.Waiting"
:
"等待中"
,
"common.Error"
:
"错误"
,
"common.Warning"
:
"警告"
,
"common.Warning"
:
"警告"
,
"common.Website"
:
"网站"
,
"common.Website"
:
"网站"
,
"common.all_result"
:
"完整结果"
,
"common.all_result"
:
"完整结果"
,
...
@@ -551,6 +548,7 @@
...
@@ -551,6 +548,7 @@
"core.dataset.import.Chunk Range"
:
"范围:{{min}}~{{max}}"
,
"core.dataset.import.Chunk Range"
:
"范围:{{min}}~{{max}}"
,
"core.dataset.import.Chunk Split"
:
"直接分段"
,
"core.dataset.import.Chunk Split"
:
"直接分段"
,
"core.dataset.import.Chunk Split Tip"
:
"将文本按一定的规则进行分段处理后,转成可进行语义搜索的格式,适合绝大多数场景。不需要调用模型额外处理,成本低。"
,
"core.dataset.import.Chunk Split Tip"
:
"将文本按一定的规则进行分段处理后,转成可进行语义搜索的格式,适合绝大多数场景。不需要调用模型额外处理,成本低。"
,
"core.dataset.import.Continue upload"
:
"继续上传"
,
"core.dataset.import.Custom process"
:
"自定义规则"
,
"core.dataset.import.Custom process"
:
"自定义规则"
,
"core.dataset.import.Custom process desc"
:
"自定义设置数据处理规则"
,
"core.dataset.import.Custom process desc"
:
"自定义设置数据处理规则"
,
"core.dataset.import.Custom prompt"
:
"自定义提示词"
,
"core.dataset.import.Custom prompt"
:
"自定义提示词"
,
...
@@ -579,11 +577,10 @@
...
@@ -579,11 +577,10 @@
"core.dataset.import.Select source"
:
"选择来源"
,
"core.dataset.import.Select source"
:
"选择来源"
,
"core.dataset.import.Source name"
:
"来源名"
,
"core.dataset.import.Source name"
:
"来源名"
,
"core.dataset.import.Sources list"
:
"来源列表"
,
"core.dataset.import.Sources list"
:
"来源列表"
,
"core.dataset.import.Continue upload"
:
"继续上传"
,
"core.dataset.import.Upload complete"
:
"完成上传"
,
"core.dataset.import.Start upload"
:
"开始上传"
,
"core.dataset.import.Start upload"
:
"开始上传"
,
"core.dataset.import.Total files"
:
"共 {{total}} 个文件"
,
"core.dataset.import.Total files"
:
"共 {{total}} 个文件"
,
"core.dataset.import.Training mode"
:
"训练模式"
,
"core.dataset.import.Training mode"
:
"训练模式"
,
"core.dataset.import.Upload complete"
:
"完成上传"
,
"core.dataset.import.Upload data"
:
"确认上传"
,
"core.dataset.import.Upload data"
:
"确认上传"
,
"core.dataset.import.Upload file progress"
:
"文件上传进度"
,
"core.dataset.import.Upload file progress"
:
"文件上传进度"
,
"core.dataset.import.Upload status"
:
"状态"
,
"core.dataset.import.Upload status"
:
"状态"
,
...
@@ -894,6 +891,7 @@
...
@@ -894,6 +891,7 @@
"is_using"
:
"正在使用"
,
"is_using"
:
"正在使用"
,
"item_description"
:
"字段描述"
,
"item_description"
:
"字段描述"
,
"item_name"
:
"字段名"
,
"item_name"
:
"字段名"
,
"just_now"
:
"刚刚"
,
"key_repetition"
:
"key 重复"
,
"key_repetition"
:
"key 重复"
,
"move.confirm"
:
"确认移动"
,
"move.confirm"
:
"确认移动"
,
"navbar.Account"
:
"账号"
,
"navbar.Account"
:
"账号"
,
...
@@ -998,6 +996,7 @@
...
@@ -998,6 +996,7 @@
"support.user.login.Email"
:
"邮箱"
,
"support.user.login.Email"
:
"邮箱"
,
"support.user.login.Github"
:
"GitHub 登录"
,
"support.user.login.Github"
:
"GitHub 登录"
,
"support.user.login.Google"
:
"Google 登录"
,
"support.user.login.Google"
:
"Google 登录"
,
"support.user.login.Microsoft"
:
"微软登录"
,
"support.user.login.Password"
:
"密码"
,
"support.user.login.Password"
:
"密码"
,
"support.user.login.Password login"
:
"密码登录"
,
"support.user.login.Password login"
:
"密码登录"
,
"support.user.login.Phone"
:
"手机号登录"
,
"support.user.login.Phone"
:
"手机号登录"
,
...
@@ -1214,5 +1213,7 @@
...
@@ -1214,5 +1213,7 @@
"user.type"
:
"类型"
,
"user.type"
:
"类型"
,
"verification"
:
"验证"
,
"verification"
:
"验证"
,
"xx_search_result"
:
"{{key}} 的搜索结果"
,
"xx_search_result"
:
"{{key}} 的搜索结果"
,
"yes"
:
"是"
"yes"
:
"是"
,
"yesterday"
:
"昨天"
,
"yesterday_detail_time"
:
"昨天 {{time}}"
}
}
projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx
View file @
0c9e10dd
...
@@ -59,6 +59,16 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
...
@@ -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
%
3
A
%
2
F
%
2
Fgraph
.
microsoft
.
com
%
2
Fuser
.
read
&
state
=
$
{
state
.
current
}
`
}
]
: []),
...(pageType !== LoginPageTypeEnum.passwordLogin
...(pageType !== LoginPageTypeEnum.passwordLogin
? [
? [
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment