diff --git a/web/berry/src/config.js b/web/berry/src/config.js index b5eaa831..f38d16fb 100644 --- a/web/berry/src/config.js +++ b/web/berry/src/config.js @@ -27,6 +27,7 @@ const config = { oauth2_app_id: '', oauth2_authorization_endpoint: '', oauth2_token_endpoint: '', + oauth2_userinfo_endpoint: '', } }; diff --git a/web/berry/src/views/Setting/component/SystemSetting.js b/web/berry/src/views/Setting/component/SystemSetting.js index f868006b..c77ae55f 100644 --- a/web/berry/src/views/Setting/component/SystemSetting.js +++ b/web/berry/src/views/Setting/component/SystemSetting.js @@ -38,6 +38,7 @@ const SystemSetting = () => { OAuth2AppSecret: '', OAuth2AuthorizationEndpoint: '', OAuth2TokenEndpoint: '', + OAuth2UserinfoEndpoint: '', Notice: '', SMTPServer: '', SMTPPort: '', @@ -152,7 +153,8 @@ const SystemSetting = () => { name === 'OAuth2AppId' || name === 'OAuth2AppSecret' || name === 'OAuth2AuthorizationEndpoint' || - name === 'OAuth2TokenEndpoint' + name === 'OAuth2TokenEndpoint' || + name === 'OAuth2UserinfoEndpoint' ) { setInputs((inputs) => ({ ...inputs, [name]: value })); @@ -241,7 +243,8 @@ const SystemSetting = () => { OAuth2AppId: inputs.OAuth2AppId, OAuth2AppSecret: inputs.OAuth2AppSecret, OAuth2AuthorizationEndpoint: inputs.OAuth2AuthorizationEndpoint, - OAuth2TokenEndpoint: inputs.OAuth2TokenEndpoint + OAuth2TokenEndpoint: inputs.OAuth2TokenEndpoint, + OAuth2UserinfoEndpoint: inputs.OAuth2UserinfoEndpoint }; console.log(OAuth2Config); if (originInputs['OAuth2AppId'] !== inputs.OAuth2AppId) { @@ -256,6 +259,9 @@ const SystemSetting = () => { if (originInputs['OAuth2TokenEndpoint'] !== inputs.OAuth2TokenEndpoint) { await updateOption('OAuth2TokenEndpoint', inputs.OAuth2TokenEndpoint); } + if (originInputs['OAuth2UserinfoEndpoint'] !== inputs.OAuth2UserinfoEndpoint) { + await updateOption('OAuth2UserinfoEndpoint', inputs.OAuth2UserinfoEndpoint); + } }; return ( @@ -727,6 +733,20 @@ const SystemSetting = () => { /> + + + 用户地址 + + +