diff --git a/esi_sso.go b/esi_sso.go index 0758830..9495973 100644 --- a/esi_sso.go +++ b/esi_sso.go @@ -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")