fix: handle oauth provider id mismatch correctly

This commit is contained in:
Stavros
2026-03-30 23:02:13 +03:00
parent ce581a76f1
commit da247f8552
4 changed files with 18 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import (
type OAuthServiceImpl interface {
Name() string
ID() string
NewRandom() string
GetAuthURL(state string, verifier string) string
GetToken(code string, verifier string) (*oauth2.Token, error)
@@ -39,7 +40,7 @@ func (broker *OAuthBrokerService) Init() error {
broker.services[name] = presetFunc(cfg)
tlog.App.Debug().Str("service", name).Msg("Loaded OAuth service from preset")
} else {
broker.services[name] = NewOAuthService(cfg)
broker.services[name] = NewOAuthService(cfg, name)
tlog.App.Debug().Str("service", name).Msg("Loaded OAuth service from config")
}
}