1
0

fix: remove old saved openid provider settings from cache when starting Vikunja

Resolves https://kolaente.dev/vikunja/api/issues/1487
This commit is contained in:
kolaente 2023-04-10 13:32:16 +02:00
parent 4decbf9fc4
commit 9bf535d06f
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import (
"code.vikunja.io/api/pkg/mail" "code.vikunja.io/api/pkg/mail"
"code.vikunja.io/api/pkg/migration" "code.vikunja.io/api/pkg/migration"
"code.vikunja.io/api/pkg/models" "code.vikunja.io/api/pkg/models"
"code.vikunja.io/api/pkg/modules/auth/openid"
"code.vikunja.io/api/pkg/modules/keyvalue" "code.vikunja.io/api/pkg/modules/keyvalue"
migrator "code.vikunja.io/api/pkg/modules/migration" migrator "code.vikunja.io/api/pkg/modules/migration"
"code.vikunja.io/api/pkg/notifications" "code.vikunja.io/api/pkg/notifications"
@ -98,6 +99,7 @@ func FullInit() {
user.RegisterDeletionNotificationCron() user.RegisterDeletionNotificationCron()
models.RegisterUserDeletionCron() models.RegisterUserDeletionCron()
models.RegisterOldExportCleanupCron() models.RegisterOldExportCleanupCron()
openid.CleanupSavedOpenIDProviders()
// Start processing events // Start processing events
go func() { go func() {

View File

@ -161,3 +161,7 @@ func getProviderFromMap(pi map[string]interface{}) (provider *Provider, err erro
return return
} }
func CleanupSavedOpenIDProviders() {
_ = keyvalue.Del("openid_providers")
}