Fix bug when the linked account was disactived and list the linked accounts (#29263)

The bug has been fixed on v1.22 but not backport to v1.21.
This original PR have many refactors so I don't think it's necessary to
backport all of them.

Fix #28667
This commit is contained in:
Lunny Xiao authored and GitHub committed 2024-02-19 15:23:47 +00:00
1 parent 5b8b22bd75
commit e2eac7574f
5 files changed
+16 -13

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ func ResetOAuth2() error {
// initOAuth2Sources is used to load and register all active OAuth2 providers
func initOAuth2Sources() error {
authSources, _ := auth.GetActiveOAuth2ProviderSources()
authSources, _ := auth.GetOAuth2ProviderSources(true)
for _, source := range authSources {
oauth2Source, ok := source.Cfg.(*Source)
if !ok {