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

User gets redirected to "/auth/shopify" with routing error #97

Open
usama520 opened this issue Oct 1, 2020 · 5 comments
Open

User gets redirected to "/auth/shopify" with routing error #97

usama520 opened this issue Oct 1, 2020 · 5 comments

Comments

@usama520
Copy link

usama520 commented Oct 1, 2020

After using a nested route, I am getting an exception for routing error No route matches [GET] "/auth/shopify". Is there a way around this so that the setup callback gets triggered? Moreover, is there a way to trigger the callback manually so that I can avoid my page not found route getting triggered?

@usama520 usama520 changed the title User gets redirected to /auth/shopify with routing error User gets redirected to "/auth/shopify" with routing error Oct 1, 2020
@tanema
Copy link

tanema commented Oct 1, 2020

Can you give us steps to reproduce. For instance why and how are you getting No route matches [GET] "/auth/shopify"? What are you doing to get that. What does your config look like for your nested route. What is the output of rails routes. /auth/shopify is not the callback url /auth/shopify/callback is. No you cannot trigger it manually, at least not with anything that would help you because you cannot install and app/authenticate without negotiating with the external service.

@usama520
Copy link
Author

usama520 commented Oct 2, 2020

When I started integrating this, I commented out all my existing routes and it worked perfectly. When I uncommented them, that's when I started facing the issue. Do you need me to post all my routes here? Do they even make a difference?

@usama520
Copy link
Author

usama520 commented Oct 3, 2020

I have a devise route in my routes file as such which is causing the issue: devise_for :agents. Is there any workaround for this?

@jonsinclair1
Copy link

I am having the same issue, it was introduced with the update to shopify_app 18.0. I made no other changes from 17.2

For now I've rolled back to 17.2, hopefully a future release will fix it.

@asecondwill
Copy link

asecondwill commented Jun 16, 2021

@tanema - i'm having a hard time getting shopify_app to authenticate consistently. or at all in chrome. I came accross this post and this comment jumped out.

/auth/shopify is not the callback url /auth/shopify/callback is

When i try to install my demo app on a test store, it ends up with a InvalidAuthenticityToken error at that path. Should it not even be at that path? I do not think I have set anything to post there. Very default setup.


Started POST "/auth/shopify" for 88.97.13.38 at 2021-06-16 18:02:11 +0100
Cannot render console from 88.97.13.38! Allowed networks: 127.0.0.0/127.255.255.255, ::1
D, [2021-06-16T18:02:11.536897 #95197] DEBUG -- omniauth: (shopify) Setup endpoint detected, running now.
D, [2021-06-16T18:02:11.537058 #95197] DEBUG -- omniauth: (shopify) Request phase initiated.
E, [2021-06-16T18:02:11.537508 #95197] ERROR -- omniauth: (shopify) Authentication failure! ActionController::InvalidAuthenticityToken: ActionController::InvalidAuthenticityToken, ActionController::InvalidAuthenticityToken

Any help would be awesome. I am so stuck.

https://github.com/asecondwill/shopifydemo3

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

No branches or pull requests

4 participants