File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
frontend/src/views/settings Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 35
35
<b-field :label =" $t('settings.security.OIDCRedirectURL')" >
36
36
<code ><copy-text :text =" `${serverConfig.root_url}/auth/oidc`" /></code >
37
37
</b-field >
38
+ <p v-if =" !isURLOk" class =" has-text-danger" >
39
+ <b-icon icon =" warning-empty" />
40
+ {{ $t('settings.security.OIDCRedirectWarning') }}
41
+ </p >
38
42
</div >
39
43
</div >
40
44
@@ -93,6 +97,15 @@ export default Vue.extend({
93
97
isMobile () {
94
98
return this .windowWidth <= 768 ;
95
99
},
100
+
101
+ isURLOk () {
102
+ try {
103
+ const u = new URL (this .serverConfig .root_url );
104
+ return u .hostname !== ' localhost' && u .hostname !== ' 127.0.0.1' ;
105
+ } catch (e) {
106
+ return false ;
107
+ }
108
+ },
96
109
},
97
110
98
111
methods: {
Original file line number Diff line number Diff line change 368
368
"settings.security.OIDCClientID" : " Client ID" ,
369
369
"settings.security.OIDCClientSecret" : " Client secret" ,
370
370
"settings.security.OIDCRedirectURL" : " Redirect URL for oAuth provider" ,
371
+ "settings.security.OIDCRedirectWarning" : " This does not seem to be a production URL. Change the Root URL in 'General' settings." ,
371
372
"settings.appearance.adminHelp" : " Custom CSS to apply to the admin UI." ,
372
373
"settings.appearance.adminName" : " Admin" ,
373
374
"settings.appearance.customCSS" : " Custom CSS" ,
You can’t perform that action at this time.
0 commit comments