aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/auth
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-02-09 17:48:15 +0100
committerChocobozzz <me@florianbigard.com>2022-02-09 17:48:15 +0100
commit9d8ef212ff46cc1b96dc407a85e7486f185c5179 (patch)
tree61fd2a1a03f84d5fefc6f257fc358b637c791a24 /server/lib/auth
parent57a9b61a4aeead74e8800bbfad82ef433313b204 (diff)
downloadPeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.gz
PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.zst
PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.zip
Fix broken dep
Diffstat (limited to 'server/lib/auth')
-rw-r--r--server/lib/auth/oauth-model.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/auth/oauth-model.ts b/server/lib/auth/oauth-model.ts
index 81b6529d8..5d68f44e9 100644
--- a/server/lib/auth/oauth-model.ts
+++ b/server/lib/auth/oauth-model.ts
@@ -9,9 +9,9 @@ import { UserAdminFlag } from '@shared/models/users/user-flag.model'
9import { UserRole } from '@shared/models/users/user-role' 9import { UserRole } from '@shared/models/users/user-role'
10import { logger } from '../../helpers/logger' 10import { logger } from '../../helpers/logger'
11import { CONFIG } from '../../initializers/config' 11import { CONFIG } from '../../initializers/config'
12import { UserModel } from '../../models/user/user'
13import { OAuthClientModel } from '../../models/oauth/oauth-client' 12import { OAuthClientModel } from '../../models/oauth/oauth-client'
14import { OAuthTokenModel } from '../../models/oauth/oauth-token' 13import { OAuthTokenModel } from '../../models/oauth/oauth-token'
14import { UserModel } from '../../models/user/user'
15import { createUserAccountAndChannelAndPlaylist } from '../user' 15import { createUserAccountAndChannelAndPlaylist } from '../user'
16import { TokensCache } from './tokens-cache' 16import { TokensCache } from './tokens-cache'
17 17
@@ -116,6 +116,7 @@ async function getUser (usernameOrEmail?: string, password?: string, bypassLogin
116 logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') 116 logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).')
117 117
118 const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) 118 const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail)
119
119 // If we don't find the user, or if the user belongs to a plugin 120 // If we don't find the user, or if the user belongs to a plugin
120 if (!user || user.pluginAuth !== null || !password) return null 121 if (!user || user.pluginAuth !== null || !password) return null
121 122