Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSubmit never called when using passwordless one-time codes #386

Open
5 tasks done
janoschp opened this issue Jun 3, 2024 · 2 comments
Open
5 tasks done

onSubmit never called when using passwordless one-time codes #386

janoschp opened this issue Jun 3, 2024 · 2 comments
Labels
bug Something is not working.

Comments

@janoschp
Copy link

janoschp commented Jun 3, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

When using ory elements UserAuthCard and only offering the passwordless one-time code the onSubmit method of the UserAuthCard is never called. I use a custom domain and I have disabled the ory account experience. What happens is that the {custom domain ory api endpoint url}/registration?flow=flow-id is opened, which in turn redirects to the {my custom domain website}/registration?flow=flow-id url. The onSubmit function is never called and I loose all query params like return_to in the process.

Reproducing the bug

Setup a web project which only offers passwordless one-time codes. Use ory elements and the UserAuthCard. Setup a custom domain. Write your email and click "sign up with code". The redirect is triggered. Should: not trigger any redirect, just trigger the onSubmit function.

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, react, typescript

@janoschp janoschp added the bug Something is not working. label Jun 3, 2024
@janoschp
Copy link
Author

janoschp commented Jun 4, 2024

Follow up: When using a setup like this:

<UserAuthForm ...>
    <AuthCodeSection nodes={flow.ui.nodes} />
</UserAuthForm>

instead of a

 <UserAuthCard .../>

then the problem is gone and onSubmit is called.

@aeneasr
Copy link
Member

aeneasr commented Jun 4, 2024

Thank you for the report - we are working on a GA version of Ory Elements (breaking changes to be expected ...) which has a much better designed API, support for SSR, and many more features common in today's react ecosystem. It is therefore unlikely that we will resolve this issue in the current Ory Elements version but would accept PRs to fix it.

The current ory elements version will then go into maintenance mode where no new features are added but if important bugs or security issues exist, they would be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants