]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/oauth-model.ts
Add other tests to external auth
[github/Chocobozzz/PeerTube.git] / server / lib / oauth-model.ts
index dbcba897a39d9fb037232251c8c9c19d3fa8abcb..e5ea4636ee8b2e83dfc3c18afc74a29da4e9a3c8 100644 (file)
@@ -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