{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/angularfire/issues/525","labels_url":"https://api.github.com/repos/firebase/angularfire/issues/525/labels{/name}","comments_url":"https://api.github.com/repos/firebase/angularfire/issues/525/comments","events_url":"https://api.github.com/repos/firebase/angularfire/issues/525/events","html_url":"https://github.com/firebase/angularfire/issues/525","id":53846694,"number":525,"title":"Invalid documentation for createUser method","user":{"login":"ivanvoznyakovsky","id":6418145,"avatar_url":"https://avatars.githubusercontent.com/u/6418145?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanvoznyakovsky","html_url":"https://github.com/ivanvoznyakovsky","followers_url":"https://api.github.com/users/ivanvoznyakovsky/followers","following_url":"https://api.github.com/users/ivanvoznyakovsky/following{/other_user}","gists_url":"https://api.github.com/users/ivanvoznyakovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanvoznyakovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanvoznyakovsky/subscriptions","organizations_url":"https://api.github.com/users/ivanvoznyakovsky/orgs","repos_url":"https://api.github.com/users/ivanvoznyakovsky/repos","events_url":"https://api.github.com/users/ivanvoznyakovsky/events{/privacy}","received_events_url":"https://api.github.com/users/ivanvoznyakovsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/firebase/angularfire/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-09T09:02:06Z","updated_at":"2015-01-09T14:56:41Z","closed_at":"2015-01-09T14:33:35Z","body":"In [documentation example](https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-users-and-authentication-createusercredentials) looks like this\r\n``` javascript\r\n$scope.authObj.$createUser({\r\n  email: \"my@email.com\",\r\n  password: \"mypassword\"\r\n})\r\n```\r\n\r\nThis code gives an error: Firebase.createUser failed: First argument must contain the key \"email\" with type \"string\"\r\n\r\nThe reason is that in angularfire.js line 634 $createUser is mapped to createUser internal method which looks like this\r\n``` javascript\r\n   createUser: function(email, password) {\r\n      var deferred = this._q.defer();\r\n\r\n      this._ref.createUser({\r\n        email: email,\r\n        password: password\r\n      }, function(error) {\r\n        if (error !== null) {\r\n          deferred.reject(error);\r\n        } else {\r\n          deferred.resolve();\r\n        }\r\n      });\r\n\r\n      return deferred.promise;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/firebase/angularfire/issues/comments/69344203","html_url":"https://github.com/firebase/angularfire/issues/525#issuecomment-69344203","issue_url":"https://api.github.com/repos/firebase/angularfire/issues/525","id":69344203,"user":{"login":"ivanvoznyakovsky","id":6418145,"avatar_url":"https://avatars.githubusercontent.com/u/6418145?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanvoznyakovsky","html_url":"https://github.com/ivanvoznyakovsky","followers_url":"https://api.github.com/users/ivanvoznyakovsky/followers","following_url":"https://api.github.com/users/ivanvoznyakovsky/following{/other_user}","gists_url":"https://api.github.com/users/ivanvoznyakovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanvoznyakovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanvoznyakovsky/subscriptions","organizations_url":"https://api.github.com/users/ivanvoznyakovsky/orgs","repos_url":"https://api.github.com/users/ivanvoznyakovsky/repos","events_url":"https://api.github.com/users/ivanvoznyakovsky/events{/privacy}","received_events_url":"https://api.github.com/users/ivanvoznyakovsky/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T14:56:41Z","updated_at":"2015-01-09T14:56:41Z","body":"thnx. update to latest version. all is ok now )))"}}