{"action":"created","issue":{"url":"https://api.github.com/repos/ueberauth/ueberauth/issues/81","repository_url":"https://api.github.com/repos/ueberauth/ueberauth","labels_url":"https://api.github.com/repos/ueberauth/ueberauth/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/ueberauth/ueberauth/issues/81/comments","events_url":"https://api.github.com/repos/ueberauth/ueberauth/issues/81/events","html_url":"https://github.com/ueberauth/ueberauth/issues/81","id":344926866,"node_id":"MDU6SXNzdWUzNDQ5MjY4NjY=","number":81,"title":"404 when using `forward` in Plug.Router","user":{"login":"wess","id":176163,"node_id":"MDQ6VXNlcjE3NjE2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/176163?v=4","gravatar_id":"","url":"https://api.github.com/users/wess","html_url":"https://github.com/wess","followers_url":"https://api.github.com/users/wess/followers","following_url":"https://api.github.com/users/wess/following{/other_user}","gists_url":"https://api.github.com/users/wess/gists{/gist_id}","starred_url":"https://api.github.com/users/wess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wess/subscriptions","organizations_url":"https://api.github.com/users/wess/orgs","repos_url":"https://api.github.com/users/wess/repos","events_url":"https://api.github.com/users/wess/events{/privacy}","received_events_url":"https://api.github.com/users/wess/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-26T17:00:25Z","updated_at":"2018-07-26T17:11:40Z","closed_at":null,"author_association":"NONE","body":"My app is an umbrella with an api app that forwards to a versioned endpoint, like:\r\n\r\n`forward(\"/v1\", to: V1)`\r\n\r\ninside of the V1 router, I have a forward to my auth handler:\r\n\r\n`forward(\"/auth\", to: V1.Routes.Auth)`\r\n\r\nand my auth handler looks like:\r\n```\r\ndefmodule V1.Routes.Auth do\r\n  use Plug.Router\r\n  require Logger\r\n\r\n  plug(:match)\r\n  plug(:fetch_query_params)\r\n  plug(Ueberauth)\r\n  plug(:dispatch)\r\n\r\n  get \"/:provider/callback\" do\r\n    conn\r\n    |> send_resp(200, %{success: \"facebook\"})\r\n  end\r\n  match _ do\r\n    conn\r\n    |> send_resp(404, %{error: \"Not found\"})\r\n  end\r\nend\r\n```\r\n\r\nI have facebook configured and when ever I go to the url: `/v1/auth/facebook` I get a 404. Now if I move that /auth forward in to main api router, then `/auth/facebook` will work, but if I add `V1` in front of that url, within the `forward` at all, I get a 404. I have tried setting the base path in the config, and explicitly setting the paths for the facebook strategy config.\r\n\r\nIm not using Phoenix for this, it's pure plug. "},"comment":{"url":"https://api.github.com/repos/ueberauth/ueberauth/issues/comments/408168314","html_url":"https://github.com/ueberauth/ueberauth/issues/81#issuecomment-408168314","issue_url":"https://api.github.com/repos/ueberauth/ueberauth/issues/81","id":408168314,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE2ODMxNA==","user":{"login":"doomspork","id":73386,"node_id":"MDQ6VXNlcjczMzg2","avatar_url":"https://avatars0.githubusercontent.com/u/73386?v=4","gravatar_id":"","url":"https://api.github.com/users/doomspork","html_url":"https://github.com/doomspork","followers_url":"https://api.github.com/users/doomspork/followers","following_url":"https://api.github.com/users/doomspork/following{/other_user}","gists_url":"https://api.github.com/users/doomspork/gists{/gist_id}","starred_url":"https://api.github.com/users/doomspork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doomspork/subscriptions","organizations_url":"https://api.github.com/users/doomspork/orgs","repos_url":"https://api.github.com/users/doomspork/repos","events_url":"https://api.github.com/users/doomspork/events{/privacy}","received_events_url":"https://api.github.com/users/doomspork/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T17:11:40Z","updated_at":"2018-07-26T17:11:40Z","author_association":"MEMBER","body":"Howdy @wess, given that your second router is `V1.Routes.Auth` should your first forward to be `forward(\"/v1\", to: V1.Routes)` instead of just `V1`?\r\n\r\nDo you have a sample project I could peek at?  "}}
{"actor":{"display_login":"doomspork"}}