aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-11 18:29:06 +0200
committerChocobozzz <me@florianbigard.com>2020-05-11 18:32:58 +0200
commitd253bfaaa5f42b1fba71dc70de2932fbfdca5421 (patch)
tree33fe01c5d19c8165219852566d3f9d0a6f1f6140 /server/lib
parent5ff523664fda3acf83e319a7c08cd14af0025e99 (diff)
downloadPeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.tar.gz
PeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.tar.zst
PeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.zip
Add other tests to external auth
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/oauth-model.ts2
1 files changed, 1 insertions, 1 deletions
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) {
123 123
124 const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) 124 const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail)
125 // If we don't find the user, or if the user belongs to a plugin 125 // If we don't find the user, or if the user belongs to a plugin
126 if (!user || user.pluginAuth !== null) return null 126 if (!user || user.pluginAuth !== null || !password) return null
127 127
128 const passwordMatch = await user.isPasswordMatch(password) 128 const passwordMatch = await user.isPasswordMatch(password)
129 if (passwordMatch !== true) return null 129 if (passwordMatch !== true) return null