@@ -10,10 +10,8 @@ import {
10
10
EnabledBadge ,
11
11
EnterpriseBadge ,
12
12
} from "components/DeploySettingsLayout/Badges"
13
- import {
14
- DeploySettingsLayout ,
15
- SettingsHeader ,
16
- } from "components/DeploySettingsLayout/DeploySettingsLayout"
13
+ import { useDeploySettings } from "components/DeploySettingsLayout/DeploySettingsLayout"
14
+ import { Header } from "components/DeploySettingsLayout/Header"
17
15
import {
18
16
OptionDescription ,
19
17
OptionName ,
@@ -23,18 +21,24 @@ import { Stack } from "components/Stack/Stack"
23
21
import React from "react"
24
22
25
23
export const AuthSettingsPage : React . FC = ( ) => {
24
+ const { deploymentFlags } = useDeploySettings ( )
25
+
26
26
return (
27
- < DeploySettingsLayout >
27
+ < >
28
28
< Stack direction = "column" spacing = { 6 } >
29
29
< div >
30
- < SettingsHeader
30
+ < Header
31
31
title = "GitHub"
32
32
description = "Authentication settings for GitHub"
33
33
docsHref = "https://coder.com/docs/coder-oss/latest/admin/auth#openid-connect-with-google"
34
34
/>
35
35
36
36
< Badges >
37
- < EnabledBadge />
37
+ { deploymentFlags . oauth2_github_allow_signups . value ? (
38
+ < EnabledBadge />
39
+ ) : (
40
+ < DisabledBadge />
41
+ ) }
38
42
</ Badges >
39
43
40
44
< TableContainer >
@@ -48,27 +52,35 @@ export const AuthSettingsPage: React.FC = () => {
48
52
< TableBody >
49
53
< TableRow >
50
54
< TableCell >
51
- < OptionName > Client ID</ OptionName >
55
+ < OptionName >
56
+ { deploymentFlags . oauth2_github_client_id . name }
57
+ </ OptionName >
52
58
< OptionDescription >
53
- GitHub client ID for OAuth
59
+ { deploymentFlags . oauth2_github_client_id . description }
54
60
</ OptionDescription >
55
61
</ TableCell >
56
62
57
63
< TableCell >
58
- < OptionValue > asjdalsj-9u129jalksjlakjsd</ OptionValue >
64
+ < OptionValue >
65
+ { deploymentFlags . oauth2_github_client_id . value }
66
+ </ OptionValue >
59
67
</ TableCell >
60
68
</ TableRow >
61
69
62
70
< TableRow >
63
71
< TableCell >
64
- < OptionName > Client Secret</ OptionName >
72
+ < OptionName >
73
+ { deploymentFlags . oauth2_github_client_secret . name }
74
+ </ OptionName >
65
75
< OptionDescription >
66
- GitHub client secret for OAuth
76
+ { deploymentFlags . oauth2_github_client_secret . description }
67
77
</ OptionDescription >
68
78
</ TableCell >
69
79
70
80
< TableCell >
71
- < OptionValue > Not available</ OptionValue >
81
+ < OptionValue >
82
+ { deploymentFlags . oauth2_github_client_secret . value }
83
+ </ OptionValue >
72
84
</ TableCell >
73
85
</ TableRow >
74
86
</ TableBody >
@@ -77,14 +89,18 @@ export const AuthSettingsPage: React.FC = () => {
77
89
</ div >
78
90
79
91
< div >
80
- < SettingsHeader
92
+ < Header
81
93
title = "OIDC"
82
94
description = "Authentication settings for GitHub"
83
95
docsHref = "https://coder.com/docs/coder-oss/latest/admin/auth#openid-connect-with-google"
84
96
/>
85
97
86
98
< Badges >
87
- < DisabledBadge />
99
+ { deploymentFlags . oidc_allow_signups . value ? (
100
+ < EnabledBadge />
101
+ ) : (
102
+ < DisabledBadge />
103
+ ) }
88
104
< EnterpriseBadge />
89
105
</ Badges >
90
106
@@ -99,34 +115,42 @@ export const AuthSettingsPage: React.FC = () => {
99
115
< TableBody >
100
116
< TableRow >
101
117
< TableCell >
102
- < OptionName > Client ID</ OptionName >
118
+ < OptionName >
119
+ { deploymentFlags . oidc_client_id . name }
120
+ </ OptionName >
103
121
< OptionDescription >
104
- GitHub client ID for OAuth
122
+ { deploymentFlags . oidc_client_id . description }
105
123
</ OptionDescription >
106
124
</ TableCell >
107
125
108
126
< TableCell >
109
- < OptionValue > asjdalsj-9u129jalksjlakjsd</ OptionValue >
127
+ < OptionValue >
128
+ { deploymentFlags . oidc_client_id . value }
129
+ </ OptionValue >
110
130
</ TableCell >
111
131
</ TableRow >
112
132
113
133
< TableRow >
114
134
< TableCell >
115
- < OptionName > Client Secret</ OptionName >
135
+ < OptionName >
136
+ { deploymentFlags . oidc_cliet_secret . name }
137
+ </ OptionName >
116
138
< OptionDescription >
117
- GitHub client secret for OAuth
139
+ { deploymentFlags . oidc_cliet_secret . description }
118
140
</ OptionDescription >
119
141
</ TableCell >
120
142
121
143
< TableCell >
122
- < OptionValue > Not available</ OptionValue >
144
+ < OptionValue >
145
+ { deploymentFlags . oidc_cliet_secret . value }
146
+ </ OptionValue >
123
147
</ TableCell >
124
148
</ TableRow >
125
149
</ TableBody >
126
150
</ Table >
127
151
</ TableContainer >
128
152
</ div >
129
153
</ Stack >
130
- </ DeploySettingsLayout >
154
+ </ >
131
155
)
132
156
}
0 commit comments