From d253bfaaa5f42b1fba71dc70de2932fbfdca5421 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 May 2020 18:29:06 +0200 Subject: Add other tests to external auth --- server/lib/oauth-model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/lib') diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts index dbcba897a..e5ea4636e 100644 --- a/server/lib/oauth-model.ts +++ b/server/lib/oauth-model.ts @@ -123,7 +123,7 @@ async function getUser (usernameOrEmail?: string, password?: string) { const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) // If we don't find the user, or if the user belongs to a plugin - if (!user || user.pluginAuth !== null) return null + if (!user || user.pluginAuth !== null || !password) return null const passwordMatch = await user.isPasswordMatch(password) if (passwordMatch !== true) return null -- cgit v1.2.3