feat: add updateUserOnLogin config option for oidc, jwt

This commit is contained in:
Christoph Kluge
2024-10-23 16:17:47 +02:00
parent 934d1a6114
commit 01102cb9b0
5 changed files with 38 additions and 17 deletions

View File

@@ -168,8 +168,8 @@ func (oa *OIDC) OAuth2Callback(rw http.ResponseWriter, r *http.Request) {
AuthSource: schema.AuthViaOIDC,
}
if config.Keys.OpenIDConfig.SyncUserOnLogin {
persistUser(user)
if config.Keys.OpenIDConfig.SyncUserOnLogin || config.Keys.OpenIDConfig.UpdateUserOnLogin {
handleOIDCUser(user)
}
oa.authentication.SaveSession(rw, r, user)