@@ -16,6 +16,8 @@ import { SignInLayout } from "components/SignInLayout/SignInLayout";
16
16
import { Stack } from "components/Stack/Stack" ;
17
17
import { type FormikContextType , useFormik } from "formik" ;
18
18
import type { FC } from "react" ;
19
+ import Button from "@mui/material/Button" ;
20
+ import GitHubIcon from "@mui/icons-material/GitHub" ;
19
21
import { useEffect } from "react" ;
20
22
import { docs } from "utils/docs" ;
21
23
import {
@@ -34,6 +36,7 @@ export const Language = {
34
36
emailRequired : "Please enter an email address." ,
35
37
passwordRequired : "Please enter a password." ,
36
38
create : "Create account" ,
39
+ githubCreate : "Create account with GitHub" ,
37
40
welcomeMessage : < > Welcome to Coder</ > ,
38
41
firstNameLabel : "First name" ,
39
42
lastNameLabel : "Last name" ,
@@ -81,6 +84,11 @@ const numberOfDevelopersOptions = [
81
84
"2500+" ,
82
85
] ;
83
86
87
+ const iconStyles = {
88
+ width : 16 ,
89
+ height : 16 ,
90
+ } ;
91
+
84
92
export interface SetupPageViewProps {
85
93
onSubmit : ( firstUser : TypesGen . CreateFirstUserRequest ) => void ;
86
94
error ?: unknown ;
@@ -140,6 +148,19 @@ export const SetupPageView: FC<SetupPageViewProps> = ({
140
148
Let‘s create your first admin user account
141
149
</ div >
142
150
</ header >
151
+ < div className = "mb-8" >
152
+ < Button
153
+ component = "a"
154
+ href = { `/api/v2/users/oauth2/github/callback` }
155
+ variant = "contained"
156
+ startIcon = { < GitHubIcon css = { iconStyles } /> }
157
+ fullWidth
158
+ type = "submit"
159
+ size = "xlarge"
160
+ >
161
+ { Language . githubCreate }
162
+ </ Button >
163
+ </ div >
143
164
< VerticalForm onSubmit = { form . handleSubmit } >
144
165
< FormFields >
145
166
< TextField
0 commit comments