mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add other tests to external auth
This commit is contained in:
parent
5ff523664f
commit
d253bfaaa5
3 changed files with 96 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue