gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Authentication error #536

Closed deepakroy11 closed 3 years ago

deepakroy11 commented 4 years ago

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

Should authentication the application.

Current Behavior

After app installation on Shopify, it redirects back to my app URL and then getting an authentication error.

Failure Information

Getting below error,

GuzzleHttp\Exception\ClientException Client error: POST https://deroy-theme-app.myshopify.com/admin/oauth/access_token resulted in a 400 Bad Request response: https://simple-wishlist.test/authenticate?code=d422372968fe1ff0369ceca20cbb5194&hmac=0369aefe2eb0a0e3b8ff00276dfd91f7cfc8875656cf5f75973d44deea4933ee&shop=deroy-theme-app.myshopify.com&timestamp=1595496677

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Install Laravel and include Shopify-Laravel package
  2. Create a Shopify app and configure the API key, scope in the local setup.
  3. Install the app in Shopify using the admin panel or app URL

Note: I am running Ubuntu 20.04 on my laptop and using Valet-Linux to set up the application on my local host.

Context

Failure Logs

GuzzleHttp\Exception\ClientException Client error: POST https://deroy-theme-app.myshopify.com/admin/oauth/access_token resulted in a 400 Bad Request response: https://simple-wishlist.test/authenticate?code=d422372968fe1ff0369ceca20cbb5194&hmac=0369aefe2eb0a0e3b8ff00276dfd91f7cfc8875656cf5f75973d44deea4933ee&shop=deroy-theme-app.myshopify.com&timestamp=1595496677.

gnikyt commented 4 years ago

Not having this issue.

Have you configured your API key and API secret? What are you asking in terms of scopes?

deepakroy11 commented 4 years ago

Yes, All keys are configured. In fact, to install the app, I was directed to Shopify where all the permission were listed. After clicking install I was redirected to above URL.

Permission I am requesting for. read_products,write_products,read_themes,write_themes,read_orders,read_customers.

darrynten commented 4 years ago

This has started happening on new installs for me.

Using latest master of both this package and the basic API package and the issue is present when creating a new install.

It seems there is no body sent in the POST request to /admin/oauth/access_token

gnikyt commented 4 years ago

Are you sure theres no post data sent? Ran through Xdebug and I am seeing params go through, but I will give a fresh install a try. This could be an issue with Guzzle if nothing is being sent but is being passed.

darrynten commented 3 years ago

Might be resolved in #601

gnikyt commented 3 years ago

@deepakroy11 Is this still an issue?

gnikyt commented 3 years ago

Closing for need of info, reopen if you need.

simoni2cool commented 2 years ago

Hello , I have facing issue in shopify authentication,, My shopify app are unpublished because of issue in authentication, The app login still working after uninstall app, it only work in one refresh.. I mean when i uninstall app from shopify and refresh app web page only one time it page still shows login ,, after other refresh it work proper