{"action":"opened","issue":{"url":"https://api.github.com/repos/Shopify/shopify_app/issues/165","labels_url":"https://api.github.com/repos/Shopify/shopify_app/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/shopify_app/issues/165/comments","events_url":"https://api.github.com/repos/Shopify/shopify_app/issues/165/events","html_url":"https://github.com/Shopify/shopify_app/issues/165","id":111059529,"number":165,"title":"config.redirect_uri setting ignored in authentication flow","user":{"login":"lulessa","id":5763485,"avatar_url":"https://avatars.githubusercontent.com/u/5763485?v=3","gravatar_id":"","url":"https://api.github.com/users/lulessa","html_url":"https://github.com/lulessa","followers_url":"https://api.github.com/users/lulessa/followers","following_url":"https://api.github.com/users/lulessa/following{/other_user}","gists_url":"https://api.github.com/users/lulessa/gists{/gist_id}","starred_url":"https://api.github.com/users/lulessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lulessa/subscriptions","organizations_url":"https://api.github.com/users/lulessa/orgs","repos_url":"https://api.github.com/users/lulessa/repos","events_url":"https://api.github.com/users/lulessa/events{/privacy}","received_events_url":"https://api.github.com/users/lulessa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-12T21:27:56Z","updated_at":"2015-10-12T21:27:56Z","closed_at":null,"body":"1. In config/initializers/shopify_app.rb, set `config.redirect_uri` to any URL other than the standard https://myapp.example.com/auth/shopify/callback.\r\n2. Submit a request to your app's /login route and watch your network logs' query string parameters.\r\n3. The `redirect_uri` request param sent to the /admin/oauth/authorize endpoint is *always* equal to the /auth/shopify/callback route on the host and port where the app is running rather than the `config.redirect_uri` setting.\r\n\r\nThis is a corner case, for sure. Always submitting the /auth/shopify/callback route as the redirect_uri param may work just fine for your standard app setup, but when developing and using a different port for https vs http (#160), for example, it rears its ugly head.\r\n\r\nThe setting is there, but it has no effect. A search for `redirect_uri` in this repo shows zero evidence of the redirect_uri URL param being set during Shopify API's authentication flow.\r\n\r\nIt looks like `create_permission_url(scope, redirect_uri)` has to be called on the ShopifyAPI session at some point, as seen here:\r\nhttps://github.com/Shopify/shopify_api/blob/4fb8f572136b9641157ecc177551e12744c27959/test/session_test.rb#L86"}}