mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 03:31:46 +00:00
adjusted SSOSettings model and changed all code based on the model
This commit is contained in:
parent
b12a38d12b
commit
3cd09eecba
9 changed files with 251 additions and 103 deletions
|
|
@ -217,11 +217,12 @@ 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) {
|
||||
let user = this.db.users.find(u => u.ssoId === profile.id)
|
||||
if (!user && this.db.SSOSettings.user.createNewUser) {
|
||||
// create a user
|
||||
let account = {}
|
||||
account.id = profile.id
|
||||
account.id = profile.username
|
||||
account.ssoId = profile.id
|
||||
account.username = profile.username
|
||||
account.isActive = true
|
||||
account.type = "guest"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue