Set up callback handler on start and not dynamically

Since we can't do it dynamically
This commit is contained in:
2025-10-10 20:32:49 +02:00
parent e7c433f1c1
commit a296a4c684

View File

@@ -83,6 +83,7 @@ func NewSSO(clientID, redirectURI string, scopes []string) (*SSO, error) {
func (s *SSO) SetRouter(r *router.Router) {
s.router = r
logger.Debug("SSO configured to use existing fasthttp router")
s.setupCallbackHandler()
}
func (s *SSO) initDB() error {
@@ -186,7 +187,6 @@ func (s *SSO) startAuthFlow(ctx context.Context, characterName string) error {
return errors.New("no router configured for callback handling")
}
logger.Debug("Using fasthttp router for callback handling")
s.setupCallbackHandler()
// Wait for callback
logger.Debug("Waiting for authentication callback")