phpish / shopify_app-skeleton

Skeleton Shopify App project using phpish/shopify
94 stars 41 forks source link

Redirect loop hmac keeps refreshing in URL and not seeing the redirect uri though it's set #26

Closed anagio closed 8 years ago

anagio commented 8 years ago

I've added the REDIRECT_URI constant to the config file

Set it in the permissions URL as shown in another issue.

My app URL is https://f29194c6.ngrok.io/shopifyphp/install.php and the redirect URL in app settings is https://f29194c6.ngrok.io/shopifyphp/get_products.php When I try installing the page keeps refreshing and hmac changes. I'm not seeing the redirect_uri param in the URL either.

myjanky commented 8 years ago

redirect url should be the oauth.php I believe.

anagio commented 8 years ago

@myjanky it is set to oauth.php but the page keeps redirecting back to install and hmac refreshs. I had tried some updated code from other repos mostly the shopify.php file which had slightly different functions but they weren't working either. I'm going to continue using python since it's supported.

myjanky commented 8 years ago

I recommend Ruby Rails shopify_app as it is the most commonly used and updated. These php libs take a while to update when shopify changes.

By the way. Your app url does not need to be install.php... Just make both app and redirect url the oauth.php and it should work.

anagio commented 8 years ago

I'd like to but that's a whole new language and the shopify app is connecting to another app, trying to decide if I keep each app the same language or use two. I had tried using oauth.php for the app URL but got an error about the request not coming from shopify and didn't get to debugging that. Thanks for the replies