#4615·kratos

Remove stale two_step_registration hook injection for profile_first registration

Author: andrinhCreated Sep 29, 2026Updated Sep 29, 2026
Labelsbug

Preflight checklist

Ory Network Project

No response

Describe the bug

When registration is configured to use profile_first, Kratos still appends a two_step_registration pre-registration hook entry in the config. Because Kratos automatically injects this config for the two_step_registration flow, a non-existent hook is referenced which results in Kratos logging the following warning every time a registration flow is created: "A configuration for a non-existing hook was found and will be ignored.". This is causing logs to be polluted.

Reproducing the bug

Steps to reproduce the behaviour:

  1. Run Kratos with profile_first registration enabled.
selfservice:
  flows:
    registration:
      style: profile_first
  1. Start a registration flow.
  2. Observe the following warning in the logs: "A configuration for a non-existing hook was found and will be ignored.".

Relevant log output

bash
{"audience":"application","for":"","hook":"two_step_registration","level":"warning","msg":"A configuration for a non-existing hook was found and will be ignored.","service_name":"Ory Kratos","service_version":"v26.2.0","time":"2026-09-29T15:19:45.359824885Z"}

Relevant configuration

yaml
selfservice:
  flows:
    registration:
      style: profile_first

Version

v26.2.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker

Additional Context

No response