ory / network

Ory runs a global end-to-end security infrastructure for humans, robots, and servers. We build and use open source software.
Apache License 2.0
80 stars 6 forks source link

User is not logged in after registering using passwordless one-time code #385

Open janoschp opened 4 months ago

janoschp commented 4 months ago

Preflight checklist

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

zepatrik commented 4 months ago

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.