Remove stale two_step_registration hook injection for profile_first registration
Author: andrinhCreated Sep 29, 2026Updated Sep 29, 2026
Labelsbug
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
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:
- Run Kratos with
profile_firstregistration enabled.
selfservice:
flows:
registration:
style: profile_first- Start a registration flow.
- Observe the following warning in the logs: "A configuration for a non-existing hook was found and will be ignored.".
Relevant log output
{"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
selfservice:
flows:
registration:
style: profile_firstVersion
v26.2.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker
Additional Context
No response
Source: ory/kratos