{"action":"created","issue":{"url":"https://api.github.com/repos/ueberauth/guardian/issues/90","repository_url":"https://api.github.com/repos/ueberauth/guardian","labels_url":"https://api.github.com/repos/ueberauth/guardian/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/ueberauth/guardian/issues/90/comments","events_url":"https://api.github.com/repos/ueberauth/guardian/issues/90/events","html_url":"https://github.com/ueberauth/guardian/issues/90","id":127572107,"number":90,"title":"Allow quick sign in for acceptance tests","user":{"login":"aaronrenner","id":120878,"avatar_url":"https://avatars.githubusercontent.com/u/120878?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronrenner","html_url":"https://github.com/aaronrenner","followers_url":"https://api.github.com/users/aaronrenner/followers","following_url":"https://api.github.com/users/aaronrenner/following{/other_user}","gists_url":"https://api.github.com/users/aaronrenner/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronrenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronrenner/subscriptions","organizations_url":"https://api.github.com/users/aaronrenner/orgs","repos_url":"https://api.github.com/users/aaronrenner/repos","events_url":"https://api.github.com/users/aaronrenner/events{/privacy}","received_events_url":"https://api.github.com/users/aaronrenner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"aaronrenner","id":120878,"avatar_url":"https://avatars.githubusercontent.com/u/120878?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronrenner","html_url":"https://github.com/aaronrenner","followers_url":"https://api.github.com/users/aaronrenner/followers","following_url":"https://api.github.com/users/aaronrenner/following{/other_user}","gists_url":"https://api.github.com/users/aaronrenner/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronrenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronrenner/subscriptions","organizations_url":"https://api.github.com/users/aaronrenner/orgs","repos_url":"https://api.github.com/users/aaronrenner/repos","events_url":"https://api.github.com/users/aaronrenner/events{/privacy}","received_events_url":"https://api.github.com/users/aaronrenner/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-01-20T00:17:52Z","updated_at":"2016-04-25T15:46:12Z","closed_at":null,"body":"When I'm working in Ruby, I really enjoy how Clearance's [Backdoor Middleware][0] allows me to skip the sign in process when writing browser-level acceptance tests. When in my test environment, I can append the `as` query string parameter when I make a request, and I'm automatically signed in as that user. (Here's how I'd make the request using [Hound][1]).\r\n\r\n```elixir\r\nnavigate_to \"/?as=#{user.id}\"\r\n```\r\nWhat would you think about guardian having a middleware that allows developers to be able to skip the sign in process during acceptance tests? To enable this, I was thinking they might add the following to their `web/router.ex` file.\r\n\r\n```elixir\r\npipeline :browser_session do\r\n  if Mix.env == :test do\r\n    plug Guardian.Plug.Backdoor\r\n  end\r\n  \r\n  plug Guardian.Plug.VerifySession\r\n  plug Guardian.Plug.LoadResource\r\nend\r\n```\r\n\r\nI'd be happy to work on this and I'm still thinking over the implementation details, but I wanted to run it by you before I start.\r\n\r\n[0]: https://github.com/thoughtbot/clearance#fast-feature-specs\r\n[1]: https://github.com/HashNuke/hound"},"comment":{"url":"https://api.github.com/repos/ueberauth/guardian/issues/comments/214407456","html_url":"https://github.com/ueberauth/guardian/issues/90#issuecomment-214407456","issue_url":"https://api.github.com/repos/ueberauth/guardian/issues/90","id":214407456,"user":{"login":"hassox","id":104,"avatar_url":"https://avatars.githubusercontent.com/u/104?v=3","gravatar_id":"","url":"https://api.github.com/users/hassox","html_url":"https://github.com/hassox","followers_url":"https://api.github.com/users/hassox/followers","following_url":"https://api.github.com/users/hassox/following{/other_user}","gists_url":"https://api.github.com/users/hassox/gists{/gist_id}","starred_url":"https://api.github.com/users/hassox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassox/subscriptions","organizations_url":"https://api.github.com/users/hassox/orgs","repos_url":"https://api.github.com/users/hassox/repos","events_url":"https://api.github.com/users/hassox/events{/privacy}","received_events_url":"https://api.github.com/users/hassox/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T15:46:12Z","updated_at":"2016-04-25T15:46:12Z","body":"@aphillipo Down the bottom of http://blog.overstuffedgorilla.com/simple-guardian/ there's a way to work with session stored tokens. The backdoor middleware will make this dance much simpler."}}