Set up callback handler on start and not dynamically
Since we can't do it dynamically
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user