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

Add params to override the login and authorize paths #2648

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Nov 18, 2024

WHY are these changes introduced?

Make overriding the default account paths easier. See #2607

WHAT is this pull request doing?

Expose params to override the paths. Previously this was done by providing a whole handleAuthStatus function. That's still supported for advanced usecases, but I think we should make it easier to just simply change the path. Additionally, the handleAuthStatus wouldn't help in the case someone directly links to the login page. The developer had no way to override the default /account redirect.

HOW to test your changes?

  1. Build packages/hydrogen
  2. Pull credentials into the skeleton template: h2 env pull
  3. Start up the skeleton template with a tunnel: shopify hydrogen dev --codegen --customer-account-push__unstable
  4. Make sure that account pages still work.

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Nov 18, 2024

Oxygen deployed a preview of your bl-default-customer-account-route branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment December 6, 2024 6:23 PM
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment December 6, 2024 6:23 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment December 6, 2024 6:23 PM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment December 6, 2024 6:23 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment December 6, 2024 6:23 PM

Learn more about Hydrogen's GitHub integration.

Co-authored-by: Helen Lin <helen.lin@shopify.com>
@blittle blittle merged commit 91d60fd into main Dec 6, 2024
12 checks passed
@blittle blittle deleted the bl-default-customer-account-route branch December 6, 2024 19:41
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

Successfully merging this pull request may close these issues.

3 participants