User is not logged in after registering using passwordless one-time code
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [X] I have joined the Ory Community Slack.
- [x] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
https://clever-chatterjee-k3z6gyrj80.projects.oryapis.com
Describe the bug
I have enabled passwordless one-time codes as an option for registering. I have also enabled the option "Enable sign in after registration" in the ory console of my project. As a secondary registration option I offer passkeys. When I register using the one-time code I am not automatically logged in. This means that I have to login after registering and copy the code from the email again, which is a terrible user experience and redundant step. When I register using a passkey, then there is no problem, I am logged in right away.
Reproducing the bug
Setup a project that uses ory network, enable passwordless one-time code as a registration option and "enable sign in after registration". Register using a one-time code. Result: Account is created but the user is not logged in after registering.
Relevant log output
No response
Relevant configuration
No response
Version
"@ory/client": "^1.9.0", "@ory/elements": "^0.2.0", "@ory/integrations": "^1.1.5",
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
Next.js
There are unfortunately a few issues with the hooks, execution order and console. Ideally, you would use the Ory CLI instead of the console to manage the hooks. See https://github.com/ory/network/issues/361#issuecomment-2025689765 for some details on how to do that.
We have since improved the defaults - closing :)