context.customerAccount.authorize doesn't not redirect to the route that initiated the login #2607
Labels
Bug
Something isn't working
Customer Account API
Issues related to https://shopify.dev/docs/api/customer
SEV-2
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.The text was updated successfully, but these errors were encountered: