{"action":"created","issue":{"url":"https://api.github.com/repos/DoSomething/northstar/issues/226","labels_url":"https://api.github.com/repos/DoSomething/northstar/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/DoSomething/northstar/issues/226/comments","events_url":"https://api.github.com/repos/DoSomething/northstar/issues/226/events","html_url":"https://github.com/DoSomething/northstar/issues/226","id":114913088,"number":226,"title":"Drupal password checker","user":{"login":"jonuy","id":696595,"avatar_url":"https://avatars.githubusercontent.com/u/696595?v=3","gravatar_id":"","url":"https://api.github.com/users/jonuy","html_url":"https://github.com/jonuy","followers_url":"https://api.github.com/users/jonuy/followers","following_url":"https://api.github.com/users/jonuy/following{/other_user}","gists_url":"https://api.github.com/users/jonuy/gists{/gist_id}","starred_url":"https://api.github.com/users/jonuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonuy/subscriptions","organizations_url":"https://api.github.com/users/jonuy/orgs","repos_url":"https://api.github.com/users/jonuy/repos","events_url":"https://api.github.com/users/jonuy/events{/privacy}","received_events_url":"https://api.github.com/users/jonuy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"angaither","id":645205,"avatar_url":"https://avatars.githubusercontent.com/u/645205?v=3","gravatar_id":"","url":"https://api.github.com/users/angaither","html_url":"https://github.com/angaither","followers_url":"https://api.github.com/users/angaither/followers","following_url":"https://api.github.com/users/angaither/following{/other_user}","gists_url":"https://api.github.com/users/angaither/gists{/gist_id}","starred_url":"https://api.github.com/users/angaither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angaither/subscriptions","organizations_url":"https://api.github.com/users/angaither/orgs","repos_url":"https://api.github.com/users/angaither/repos","events_url":"https://api.github.com/users/angaither/events{/privacy}","received_events_url":"https://api.github.com/users/angaither/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-11-03T21:20:31Z","updated_at":"2015-11-09T22:17:09Z","closed_at":null,"body":"### The Problem\r\n\r\nWe have a lot of users in Northstar that have a `drupal_password`, but no `password`.\r\n\r\n**Number of accounts with a drupal_password, but no password:** 2,640,924\r\n\r\n`db.users.find({drupal_password:{$exists:true}, password:{$exists: false}}).count()`\r\n\r\n---\r\n\r\n_Not sure if this information actually adds anything to the discussion, but I ran these queries anyway, so here it is..._\r\n\r\n**Number of accounts with a drupal_password:** 2,756,471\r\n\r\n`db.users.find({drupal_password:{$exists:true}}).count()`\r\n\r\n**Number of accounts without a password:** 235,599\r\n\r\n`db.users.find({password:{$exists:true}}).count()`\r\n\r\n---\r\n\r\nSo we could feasibly run into a lot of scenarios where someone tries to login on the mobile app with the credentials they already had on the Drupal site and get an \"invalid login\" error.\r\n\r\n### A Solution?\r\n\r\nCreate something in the Northstar login flow that authenticates against the user's Drupal password.\r\n\r\n1. User sends a login request\r\n2. If no `password` is found on the user doc, attempt to authenticate against the `drupal_password`\r\n3. If it succeeds (or maybe even if it doesn't), copy `drupal_password` into the user's `password` field. So then for future requests, the user will have their `password` field properly filled in.\r\n4. Allow or deny authentication like normal.\r\n\r\n@marahml Could this be a launch blocker to the mobile app?\r\n\r\ncc: @angaither @chloealee @DFurnes"},"comment":{"url":"https://api.github.com/repos/DoSomething/northstar/issues/comments/155216564","html_url":"https://github.com/DoSomething/northstar/issues/226#issuecomment-155216564","issue_url":"https://api.github.com/repos/DoSomething/northstar/issues/226","id":155216564,"user":{"login":"chloealee","id":9019452,"avatar_url":"https://avatars.githubusercontent.com/u/9019452?v=3","gravatar_id":"","url":"https://api.github.com/users/chloealee","html_url":"https://github.com/chloealee","followers_url":"https://api.github.com/users/chloealee/followers","following_url":"https://api.github.com/users/chloealee/following{/other_user}","gists_url":"https://api.github.com/users/chloealee/gists{/gist_id}","starred_url":"https://api.github.com/users/chloealee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chloealee/subscriptions","organizations_url":"https://api.github.com/users/chloealee/orgs","repos_url":"https://api.github.com/users/chloealee/repos","events_url":"https://api.github.com/users/chloealee/events{/privacy}","received_events_url":"https://api.github.com/users/chloealee/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T22:17:09Z","updated_at":"2015-11-09T22:17:09Z","body":"oh awesome, thanks so much for this Dave! I'll start playing around with it with this route!!"}}