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

context.customerAccount.authorize doesn't not redirect to the route that initiated the login #2607

Open
jmdalmasso opened this issue Oct 16, 2024 · 0 comments

Comments

@jmdalmasso
Copy link

What is the location of your example repository?

https://github.com/jmdalmasso/h2-login-redirect

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.7.9

What version of Remix are you using?

^2.10.1

Steps to Reproduce

In the prodived repo, navigate to the /start route > this will redirect you to the new Customer Account login > login and you are redirected to the account/authorize route > then you are redirected to /account even though this is not the route that initiated the login.

Expected Behavior

According to the documentation, the route that initiates the login is the route that should be redirected to when the login is finished:

"At the end of this authorization step, the application redirects back to the page that initiated the login."

This would be expected behavior anyways, or at the minimum be easy to configure in code.

Actual Behavior

The successful login always redirects to /account (which seems to be a hardcoded default). This is prevents a seemless login experience in scenarios where we just want to log the customer in but not redirect them to their account page.

@jmdalmasso jmdalmasso changed the title context.customerAccount.authorize doesn't not redirect to the route that inidated the login context.customerAccount.authorize doesn't not redirect to the route that initiated the login Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant