// Then we just go through a regular login process
if (user.pluginAuth !== null) {
// This user does not belong to this plugin, skip it
- if (user.pluginAuth !== bypassLogin.pluginName) return null
+ if (user.pluginAuth !== bypassLogin.pluginName) {
+ logger.info(
+ 'Cannot bypass oauth login by plugin %s because %s has another plugin auth method (%s).',
+ bypassLogin.pluginName, bypassLogin.user.email, user.pluginAuth
+ )
+
+ return null
+ }
checkUserValidityOrThrow(user)
password: null,
email: options.email,
nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
+ p2pEnabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED,
autoPlayVideo: true,
role: options.role,
videoQuota: CONFIG.USER.VIDEO_QUOTA,