All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hey I am creating a shopify hydrogen app and currently want ot login form my local app. Unfortunaelty it shows up the mentioned error in the image. Looks like it redirects me to my account page where the error is being trigerred by remix loaders.
Anyone has ever experienced integrating user auth flow in hydrogen app.
This is the link that the error page loads:
https://shopify.com/authentication/60802433076/oauth/authorize?client_id=shp_429055a5-1cf3-4e9f-ad61...
The following is my routes structure of account files:
Solved! Go to the solution
This is an accepted solution.
Create an .env file if you haven’t already:
In your app code:
Use this route to initiate OAuth:
This is where Shopify redirects after OAuth — here you handle the token exchange:
Make sure your account._index.tsx loader checks that the user is authenticated before rendering:
This is an accepted solution.
Create an .env file if you haven’t already:
In your app code:
Use this route to initiate OAuth:
This is where Shopify redirects after OAuth — here you handle the token exchange:
Make sure your account._index.tsx loader checks that the user is authenticated before rendering:
Where exactly I should put the following:
Thanks for the hint, it worked.