File tree Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export const LOGO_URL =
22 'https://user-images.githubusercontent.com/6964334/147834043-fc384cab-e7ca-40f8-9663-38fc25fd5f3a.png' ;
33
44export const TextInputType = {
5+ CLIENT_ID : 'CLIENT_ID' ,
56 GOOGLE_CLIENT_ID : 'GOOGLE_CLIENT_ID' ,
67 GITHUB_CLIENT_ID : 'GITHUB_CLIENT_ID' ,
78 FACEBOOK_CLIENT_ID : 'FACEBOOK_CLIENT_ID' ,
@@ -25,6 +26,7 @@ export const TextInputType = {
2526} ;
2627
2728export const HiddenInputType = {
29+ CLIENT_SECRET : 'CLIENT_SECRET' ,
2830 GOOGLE_CLIENT_SECRET : 'GOOGLE_CLIENT_SECRET' ,
2931 GITHUB_CLIENT_SECRET : 'GITHUB_CLIENT_SECRET' ,
3032 FACEBOOK_CLIENT_SECRET : 'FACEBOOK_CLIENT_SECRET' ,
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export const AdminSessionQuery = `
99export const EnvVariablesQuery = `
1010 query {
1111 _env{
12+ CLIENT_ID,
13+ CLIENT_SECRET,
1214 GOOGLE_CLIENT_ID,
1315 GOOGLE_CLIENT_SECRET,
1416 GITHUB_CLIENT_ID,
Original file line number Diff line number Diff line change @@ -240,6 +240,42 @@ export default function Environment() {
240240
241241 return (
242242 < Box m = "5" py = "5" px = "10" bg = "white" rounded = "md" >
243+ < Text fontSize = "md" paddingTop = "2%" fontWeight = "bold" >
244+ Your instance information
245+ </ Text >
246+ < Stack spacing = { 6 } padding = "2% 0%" >
247+ < Flex >
248+ < Flex w = "30%" justifyContent = "start" alignItems = "center" >
249+ < Text fontSize = "sm" > Client ID</ Text >
250+ </ Flex >
251+ < Center w = "70%" >
252+ < InputField
253+ variables = { envVariables }
254+ setVariables = { ( ) => { } }
255+ inputType = { TextInputType . CLIENT_ID }
256+ placeholder = "Client ID"
257+ isDisabled = { true }
258+ />
259+ </ Center >
260+ </ Flex >
261+ < Flex >
262+ < Flex w = "30%" justifyContent = "start" alignItems = "center" >
263+ < Text fontSize = "sm" > Client Secret</ Text >
264+ </ Flex >
265+ < Center w = "70%" >
266+ < InputField
267+ variables = { envVariables }
268+ setVariables = { setEnvVariables }
269+ fieldVisibility = { fieldVisibility }
270+ setFieldVisibility = { setFieldVisibility }
271+ inputType = { HiddenInputType . CLIENT_SECRET }
272+ placeholder = "Client Secret"
273+ isDisabled = { true }
274+ />
275+ </ Center >
276+ </ Flex >
277+ </ Stack >
278+ < Divider marginTop = "2%" marginBottom = "2%" />
243279 < Text fontSize = "md" paddingTop = "2%" fontWeight = "bold" >
244280 Social Media Logins
245281 </ Text >
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func InitAllEnv() error {
9090
9191 clientSecret := envData .StringEnv [constants .EnvKeyClientSecret ]
9292 // unique client id for each instance
93- if clientID == "" {
93+ if clientSecret == "" {
9494 clientSecret = uuid .New ().String ()
9595 envData .StringEnv [constants .EnvKeyClientSecret ] = clientSecret
9696 }
You can’t perform that action at this time.
0 commit comments