laravel-shopify icon indicating copy to clipboard operation
laravel-shopify copied to clipboard

Not redirect to home route after authenticated the app

Open sandyrewa opened this issue 3 years ago • 5 comments

Expected Behavior

After successful authenticated app should redirect to home route https://shopname.com/admin/apps/8e70e1ac2ef9c145dab4f001b504baee/appname/?shop=shopname.com&target=%2F%3Fhost%3Dc2YtZGVtby1vbmUubXlzaG9waWZ5LmNvbS9hZG1pbg

Current Behavior

After successful authenticated app redirect to this URL https://shopname.com/admin/apps/8e70e1ac2ef9c145dab4f001b504baee/appname/authenticate/token?shop=shopname.com&target=%2F%3Fhost%3Dc2YtZGVtby1vbmUubXlzaG9waWZ5LmNvbS9hZG1pbg

But it should redirect to the URL https://shopname.com/admin/apps/8e70e1ac2ef9c145dab4f001b504baee/appname/?shop=shopname.com&target=%2F%3Fhost%3Dc2YtZGVtby1vbmUubXlzaG9waWZ5LmNvbS9hZG1pbg

I'm using old version of API v16.0 into the another app and its working properly and redirected to the home route

Context

  • Package Version: v17.1
  • Laravel Version: v8.54
  • PHP Version: v8.0

sandyrewa avatar Aug 14 '21 12:08 sandyrewa

you are redirected to authenticate/token to get an access token.

v17 will not work without this.

ghost avatar Aug 15 '21 20:08 ghost

@enmaboya Ok, but not redirect to the home screen, I mean the welcome page is not visible after redirect on this page. how can I redirect to the home page route?

sandyrewa avatar Aug 18 '21 19:08 sandyrewa

Hi @sandyrewa

You have set up your web.php correctly? Can you provide more detail into the issue you are facing.

Kyon147 avatar Nov 03 '21 15:11 Kyon147

Hi @Kyon147 Thanks for your reply, I have set up routes on web.php properly, and now it's working on the server but not working on localhost, getting the infinite redirect on localhost which related to #962

sandyrewa avatar Nov 10 '21 16:11 sandyrewa

Hi @sandyrewa

As @enmaboya mentioned, v17 uses JWT tokens and that authenticate/token route is what grabs the token. It needs to happen on every page change to make sure we have a valid token.

Do you still have the issue? I.e you can't ever get to the home screen of the app just a blank page etc?

Kyon147 avatar Mar 22 '22 12:03 Kyon147

Closing stale issue, reopen if problem persists.

Kyon147 avatar Sep 11 '22 07:09 Kyon147