{"action":"created","issue":{"url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/2","labels_url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/2/comments","events_url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/2/events","html_url":"https://github.com/hadesbox/raml-api-designer-store/issues/2","id":106926567,"number":2,"title":"Problem authenticating","user":{"login":"KevinMitchell","id":5237825,"avatar_url":"https://avatars.githubusercontent.com/u/5237825?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinMitchell","html_url":"https://github.com/KevinMitchell","followers_url":"https://api.github.com/users/KevinMitchell/followers","following_url":"https://api.github.com/users/KevinMitchell/following{/other_user}","gists_url":"https://api.github.com/users/KevinMitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinMitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinMitchell/subscriptions","organizations_url":"https://api.github.com/users/KevinMitchell/orgs","repos_url":"https://api.github.com/users/KevinMitchell/repos","events_url":"https://api.github.com/users/KevinMitchell/events{/privacy}","received_events_url":"https://api.github.com/users/KevinMitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-17T07:29:17Z","updated_at":"2015-09-17T08:11:01Z","closed_at":null,"body":"Hi \r\n\r\nI tried following the instructions on setting up the system, and am having problems logging into it.  The server starts up OK.  I then add a user as follows:\r\n\r\nKevins-MacBook-Pro-5:~ kevin$ echo -n test | openssl sha1\r\na94a8fe5ccb19ba61c4c0873d391e987982fbbd3\r\n\r\nAnd then in mongo I do this\r\n> db.users.insert({\"mail\":\"kevin\", \"pass\":\"a94a8fe5ccb19ba61c4c0873d391e987982fbbd3\", \"admin\":true, \"team\":\"tedi\", \"projects\":[\"test\"]});\r\nWriteResult({ \"nInserted\" : 1 })\r\n> db.users.find()\r\n{ \"_id\" : ObjectId(\"55fa54cc08a56ac1a12361a6\"), \"mail\" : \"kevin\", \"pass\" : \"a94a8fe5ccb19ba61c4c0873d391e987982fbbd3\", \"admin\" : true, \"team\" : \"tedi\", \"projects\" : [ \"test\" ] }\r\n\r\nBut if I try to log into the system running on port 3000 with user kevin and password test it complains about wrong username or password.  As there were a few typos in the \"getting started\" instructions I'm hoping there's something simple I'm missing in the configuration that explains this behaviour.  Any suggestions?\r\n\r\nThanks,\r\nKevin"},"comment":{"url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/comments/140999304","html_url":"https://github.com/hadesbox/raml-api-designer-store/issues/2#issuecomment-140999304","issue_url":"https://api.github.com/repos/hadesbox/raml-api-designer-store/issues/2","id":140999304,"user":{"login":"beeva-luisgonzalez","id":5910202,"avatar_url":"https://avatars.githubusercontent.com/u/5910202?v=3","gravatar_id":"","url":"https://api.github.com/users/beeva-luisgonzalez","html_url":"https://github.com/beeva-luisgonzalez","followers_url":"https://api.github.com/users/beeva-luisgonzalez/followers","following_url":"https://api.github.com/users/beeva-luisgonzalez/following{/other_user}","gists_url":"https://api.github.com/users/beeva-luisgonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/beeva-luisgonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeva-luisgonzalez/subscriptions","organizations_url":"https://api.github.com/users/beeva-luisgonzalez/orgs","repos_url":"https://api.github.com/users/beeva-luisgonzalez/repos","events_url":"https://api.github.com/users/beeva-luisgonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/beeva-luisgonzalez/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T08:11:01Z","updated_at":"2015-09-17T08:11:01Z","body":"Hi  Kevin, \r\nThis is a record I have on my mongo:\r\n\r\n```\r\n{ \"_id\" : ObjectId(\"53d76...\"), \"mail\" : \"admin\", \"pass\" : \"f688d9....\", \"admin\" : true, \"projects\" : [ \"proyect1\", \"proyect2\" ], \"team\" : \"op\" }\r\n```\r\nThe only thing I can imagine is that you didn't created the users collection inside the __ramldb__ database.\r\n\r\n```\r\n> show dbs\r\nadmin   (empty)\r\nlocal   0.078GB\r\nramldb  0.078GB\r\n```\r\n\r\nby default when you connect to mongo you are in the local database.\r\n\r\nThe database is hardcoded (yes.. I know sorry)... as __ramldb__ (here)[https://github.com/hadesbox/raml-api-designer-store/blob/4ee2f22ead600c166878336f2a2f913b73659d9a/mongo-http.js#L14] and  [here](https://github.com/hadesbox/raml-api-designer-store/blob/4ee2f22ead600c166878336f2a2f913b73659d9a/routes/files.js#L8]), try creating the collection users inside the ramldb database.\r\n\r\nLet me know if you have more input from the console or any problems.. and sorry for the poor documentation! \r\n"}}