fix is basic auth enabled
This commit is contained in:
@@ -32,6 +32,7 @@ const FooterContent = styled.div`
|
||||
export default function Login({ urlProps }: { urlProps: Record<string, any> }) {
|
||||
const { config } = useAuthorizer();
|
||||
const [view, setView] = useState<VIEW_TYPES>(VIEW_TYPES.LOGIN);
|
||||
const isBasicAuth = config.is_basic_authentication_enabled;
|
||||
return (
|
||||
<Fragment>
|
||||
{view === VIEW_TYPES.LOGIN && (
|
||||
@@ -39,14 +40,16 @@ export default function Login({ urlProps }: { urlProps: Record<string, any> }) {
|
||||
<h1 style={{ textAlign: 'center' }}>Login</h1>
|
||||
<AuthorizerSocialLogin urlProps={urlProps} />
|
||||
<br />
|
||||
{config.is_basic_authentication_enabled &&
|
||||
{(config.is_basic_authentication_enabled ||
|
||||
config.is_mobile_basic_authentication_enabled) &&
|
||||
!config.is_magic_link_login_enabled && (
|
||||
<AuthorizerBasicAuthLogin urlProps={urlProps} />
|
||||
)}
|
||||
{config.is_magic_link_login_enabled && (
|
||||
<AuthorizerMagicLinkLogin urlProps={urlProps} />
|
||||
)}
|
||||
{config.is_basic_authentication_enabled && (
|
||||
{(config.is_basic_authentication_enabled ||
|
||||
config.is_mobile_basic_authentication_enabled) && (
|
||||
<Footer>
|
||||
<Link
|
||||
to="#"
|
||||
|
Reference in New Issue
Block a user