File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ sable : minor
3+ ---
4+
5+ Added config option ` hideUsernamePasswordFields ` for hosts to hide username and password fields from login page.
Original file line number Diff line number Diff line change 55 "elementCallUrl" : null ,
66
77 "disableAccountSwitcher" : false ,
8+ "hideUsernamePasswordFields" : false ,
89
910 "pushNotificationDetails" : {
1011 "pushNotifyUrl" : " https://cinny.cc/_matrix/push/v1/notify" ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export type ClientConfig = {
1212 elementCallUrl ?: string ;
1313
1414 disableAccountSwitcher ?: boolean ;
15+ hideUsernamePasswordFields ?: boolean ;
1516
1617 pushNotificationDetails ?: {
1718 pushNotifyUrl ?: string ;
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const useLoginSearchParams = (searchParams: URLSearchParams): LoginPathSearchPar
3737export function Login ( ) {
3838 const server = useAuthServer ( ) ;
3939 const { hashRouter } = useClientConfig ( ) ;
40+ const { hideUsernamePasswordFields } = useClientConfig ( ) ;
4041 const { loginFlows } = useAuthFlows ( ) ;
4142 const [ searchParams ] = useSearchParams ( ) ;
4243 const loginSearchParams = useLoginSearchParams ( searchParams ) ;
@@ -62,7 +63,7 @@ export function Login() {
6263 { parsedFlows . token && loginSearchParams . loginToken && (
6364 < TokenLogin token = { loginSearchParams . loginToken } />
6465 ) }
65- { parsedFlows . password && (
66+ { ! hideUsernamePasswordFields && parsedFlows . password && (
6667 < >
6768 < PasswordLoginForm
6869 defaultUsername = { loginSearchParams . username }
You can’t perform that action at this time.
0 commit comments