ory/kratos · error

unable to find strategy for

Error message

unable to find strategy for %s have %v

What it means

The settings flow's Strategies.Strategy compared its SettingsStrategyID string against every registered settings strategy and found no match. Like the login/registration variants, the error includes the available ids: the requested settings method simply is not registered in this instance.

Solutions

  1. Enable the corresponding selfservice method (e.g. profile, password, totp) in configuration
  2. Use the 'have %v' list to verify which settings strategies are loaded
  3. Check for typos in the strategy id being requested
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at selfservice/flow/settings/strategy.go:44 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ory/kratos@b86338da04 (2026-09-07). Data as JSON: /api/errors/ffb5848479f600d5. Report an issue: GitHub.

Appendix: source

Thrown at selfservice/flow/settings/strategy.go:44

type Strategy interface {
	SettingsStrategyID() string
	NodeGroup() node.UiNodeGroup
	PopulateSettingsMethod(context.Context, *http.Request, *identity.Identity, *Flow) error
	Settings(ctx context.Context, w http.ResponseWriter, r *http.Request, f *Flow, s *session.Session) (*UpdateContext, error)
}

type Strategies []Strategy

func (s Strategies) Strategy(id string) (Strategy, error) {
	ids := make([]string, len(s))
	for k, ss := range s {
		ids[k] = ss.SettingsStrategyID()
		if ss.SettingsStrategyID() == id {
			return ss, nil
		}
	}

	return nil, errors.Errorf(`unable to find strategy for %s have %v`, id, ids)
}

func (s Strategies) MustStrategy(id string) Strategy {
	strategy, err := s.Strategy(id)
	if err != nil {
		panic(err)
	}
	return strategy
}

// StrategyFilter selects which Settings strategies to include when populating a flow.
type StrategyFilter func(strategy Strategy) bool

type StrategyProvider interface {
	SettingsStrategies(ctx context.Context, filters ...StrategyFilter) Strategies
	AllSettingsStrategies() Strategies
}

View on GitHub (pinned to b86338da04)