modified serialization and deserialization of users to only use the useres id, only creating oidc related enpoints, if oidc is configured

This commit is contained in:
David Leimroth 2022-02-09 16:49:17 +01:00
parent cd3feee583
commit 4b93882494
2 changed files with 13 additions and 21 deletions

View file

@ -2,6 +2,7 @@ const bcrypt = require('bcryptjs')
const jwt = require('jsonwebtoken')
const Logger = require('./Logger')
const User = require('./objects/User')
const { getId } = require('./utils/index')
class Auth {
constructor(db) {
@ -216,7 +217,6 @@ class Auth {
async handleOIDCVerification(issuer, profile, cb) {
Logger.debug(`[Auth] handleOIDCVerification ${issuer}`)
let user = this.db.users.find(u => u.id === profile.id)
if (!user && this.db.SSOSettings.createNewUser) {
// create a user