@@ -11,7 +11,7 @@ import { api } from '../utilities/api';
1111import useAppContext from '../utilities/use-app-context' ;
1212
1313function SignIn ( ) {
14- const [ email , setEmail ] = useState ( '' ) ;
14+ const [ username , setUsername ] = useState ( '' ) ;
1515 const [ password , setPassword ] = useState ( '' ) ;
1616 const history = useHistory ( ) ;
1717 const { config } = useAppContext ( ) ;
@@ -23,7 +23,7 @@ function SignIn() {
2323 const signIn = async ( e : React . FormEvent ) => {
2424 e . preventDefault ( ) ;
2525
26- const json = await api . post ( '/api/signin' , { email , password } ) ;
26+ const json = await api . post ( '/api/signin' , { username , password } ) ;
2727 if ( json . error ) {
2828 return message . error ( 'Username or password incorrect' ) ;
2929 }
@@ -37,21 +37,21 @@ function SignIn() {
3737
3838 let placeholderText = '' ;
3939 if ( config . ldapConfigured && config . localAuthConfigured ) {
40- placeholderText = 'username or email address ' ;
40+ placeholderText = 'username' ;
4141 } else if ( config . ldapConfigured ) {
4242 placeholderText = 'username' ;
4343 } else if ( config . localAuthConfigured ) {
44- placeholderText = 'email address ' ;
44+ placeholderText = 'username ' ;
4545 }
4646
4747 const localLdapForm = (
4848 < form onSubmit = { signIn } >
4949 < Input
50- name = "email "
51- type = "email "
50+ name = "username "
51+ type = "text "
5252 placeholder = { placeholderText }
5353 onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
54- setEmail ( e . target . value )
54+ setUsername ( e . target . value )
5555 }
5656 required
5757 />
@@ -76,7 +76,7 @@ function SignIn() {
7676 </ Button >
7777 < Spacer />
7878
79- { config . localAuthConfigured && (
79+ { /* { config.localAuthConfigured && (
8080 <Link
8181 style={{
8282 display: 'inline-block',
@@ -87,7 +87,7 @@ function SignIn() {
8787 >
8888 Sign Up
8989 </Link>
90- ) }
90+ )} */ }
9191 </ form >
9292 ) ;
9393
0 commit comments