diff --git a/src/assets/views/auth/auth.svelte b/src/assets/views/auth/auth.svelte
index 9fd47ce..1c6b039 100644
--- a/src/assets/views/auth/auth.svelte
+++ b/src/assets/views/auth/auth.svelte
@@ -34,17 +34,19 @@
hint={loginUsingMagicLink ? 'You will receive a magic link in your mailbox. Click on the link from any device to authenticate here.' : ''}
placeholder="Your email address or username" required/>
- {#if !loginUsingMagicLink}
-
-
- {:else}
-
+ {#if $locals.hasPassword}
+ {#if loginUsingMagicLink}
+
+ {:else}
+
+
+ {/if}
{/if}
diff --git a/src/auth/AuthController.ts b/src/auth/AuthController.ts
index a5b47e6..d3a54ab 100644
--- a/src/auth/AuthController.ts
+++ b/src/auth/AuthController.ts
@@ -44,10 +44,12 @@ export default class AuthController extends Controller {
const userModelFactory = ModelFactory.get(User);
const hasUsername = userModelFactory.hasComponent(UserNameComponent);
+ const hasPassword = userModelFactory.hasComponent(UserPasswordComponent);
res.formatViewData('auth/auth', {
auth_methods: authGuard.getAuthMethodNames(),
hasUsername: hasUsername,
- canRegisterWithPassword: hasUsername && userModelFactory.hasComponent(UserPasswordComponent),
+ hasPassword: hasPassword,
+ canRegisterWithPassword: hasUsername && hasPassword,
});
}