{"action":"created","comment":{"url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/comments/70184281","id":70184281,"diff_hunk":"@@ -72,5 +72,48 @@ export default {\n         this.resetToken = \"\";\n         return this.save();\n       });\n+  },\n+\n+  /**\n+   * Generates a token for verifying a new user.\n+   * Later the token can be verified with \"verifyVerificationToken\"\n+   * @returns {*}\n+   */\n+  generateVerificationToken() {\n+    const token = chance.hash(); // 40 chars by default\n+    this.verificationToken = token;\n+    return this.save();\n+  },\n+\n+  /**\n+   * Compares the token provided to the verification token that is saved on the user\n+   * Returns a promise - resolves if the tokens are equal, otherwise rejects and throws an error\n+   * @param token\n+   * @returns {Promise}\n+   */\n+  verifyVerificationToken(token) {\n+    return new Promise((resolve, reject) => {\n+      if (this.verificationToken === token) {\n+        resolve();","path":"src/methods.js","position":35,"original_position":35,"commit_id":"a9bb8245fbe9cd0809f8978c824dd1b23bc06696","original_commit_id":"a9bb8245fbe9cd0809f8978c824dd1b23bc06696","user":{"login":"rom10","id":5627172,"avatar_url":"https://avatars.githubusercontent.com/u/5627172?v=3","gravatar_id":"","url":"https://api.github.com/users/rom10","html_url":"https://github.com/rom10","followers_url":"https://api.github.com/users/rom10/followers","following_url":"https://api.github.com/users/rom10/following{/other_user}","gists_url":"https://api.github.com/users/rom10/gists{/gist_id}","starred_url":"https://api.github.com/users/rom10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom10/subscriptions","organizations_url":"https://api.github.com/users/rom10/orgs","repos_url":"https://api.github.com/users/rom10/repos","events_url":"https://api.github.com/users/rom10/events{/privacy}","received_events_url":"https://api.github.com/users/rom10/received_events","type":"User","site_admin":false},"body":"It's better to return something, maybe true","created_at":"2016-07-10T16:05:30Z","updated_at":"2016-07-10T16:05:30Z","html_url":"https://github.com/bookmd/mongoose-meteor-account/pull/2#discussion_r70184281","pull_request_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/comments/70184281"},"html":{"href":"https://github.com/bookmd/mongoose-meteor-account/pull/2#discussion_r70184281"},"pull_request":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2","id":76876768,"html_url":"https://github.com/bookmd/mongoose-meteor-account/pull/2","diff_url":"https://github.com/bookmd/mongoose-meteor-account/pull/2.diff","patch_url":"https://github.com/bookmd/mongoose-meteor-account/pull/2.patch","issue_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/2","number":2,"state":"open","locked":false,"title":"Adding user verification support","user":{"login":"chenrozenes","id":5238168,"avatar_url":"https://avatars.githubusercontent.com/u/5238168?v=3","gravatar_id":"","url":"https://api.github.com/users/chenrozenes","html_url":"https://github.com/chenrozenes","followers_url":"https://api.github.com/users/chenrozenes/followers","following_url":"https://api.github.com/users/chenrozenes/following{/other_user}","gists_url":"https://api.github.com/users/chenrozenes/gists{/gist_id}","starred_url":"https://api.github.com/users/chenrozenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenrozenes/subscriptions","organizations_url":"https://api.github.com/users/chenrozenes/orgs","repos_url":"https://api.github.com/users/chenrozenes/repos","events_url":"https://api.github.com/users/chenrozenes/events{/privacy}","received_events_url":"https://api.github.com/users/chenrozenes/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-10T15:59:11Z","updated_at":"2016-07-10T16:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3746fb7bc066a891b1aae47035d7117f4c6ac8e8","assignee":{"login":"asafdav","id":1223211,"avatar_url":"https://avatars.githubusercontent.com/u/1223211?v=3","gravatar_id":"","url":"https://api.github.com/users/asafdav","html_url":"https://github.com/asafdav","followers_url":"https://api.github.com/users/asafdav/followers","following_url":"https://api.github.com/users/asafdav/following{/other_user}","gists_url":"https://api.github.com/users/asafdav/gists{/gist_id}","starred_url":"https://api.github.com/users/asafdav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asafdav/subscriptions","organizations_url":"https://api.github.com/users/asafdav/orgs","repos_url":"https://api.github.com/users/asafdav/repos","events_url":"https://api.github.com/users/asafdav/events{/privacy}","received_events_url":"https://api.github.com/users/asafdav/received_events","type":"User","site_admin":false},"assignees":[{"login":"asafdav","id":1223211,"avatar_url":"https://avatars.githubusercontent.com/u/1223211?v=3","gravatar_id":"","url":"https://api.github.com/users/asafdav","html_url":"https://github.com/asafdav","followers_url":"https://api.github.com/users/asafdav/followers","following_url":"https://api.github.com/users/asafdav/following{/other_user}","gists_url":"https://api.github.com/users/asafdav/gists{/gist_id}","starred_url":"https://api.github.com/users/asafdav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asafdav/subscriptions","organizations_url":"https://api.github.com/users/asafdav/orgs","repos_url":"https://api.github.com/users/asafdav/repos","events_url":"https://api.github.com/users/asafdav/events{/privacy}","received_events_url":"https://api.github.com/users/asafdav/received_events","type":"User","site_admin":false},{"login":"rom10","id":5627172,"avatar_url":"https://avatars.githubusercontent.com/u/5627172?v=3","gravatar_id":"","url":"https://api.github.com/users/rom10","html_url":"https://github.com/rom10","followers_url":"https://api.github.com/users/rom10/followers","following_url":"https://api.github.com/users/rom10/following{/other_user}","gists_url":"https://api.github.com/users/rom10/gists{/gist_id}","starred_url":"https://api.github.com/users/rom10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom10/subscriptions","organizations_url":"https://api.github.com/users/rom10/orgs","repos_url":"https://api.github.com/users/rom10/repos","events_url":"https://api.github.com/users/rom10/events{/privacy}","received_events_url":"https://api.github.com/users/rom10/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2/commits","review_comments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2/comments","review_comment_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/2/comments","statuses_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/statuses/a9bb8245fbe9cd0809f8978c824dd1b23bc06696","head":{"label":"bookmd:feature-verification-email","ref":"feature-verification-email","sha":"a9bb8245fbe9cd0809f8978c824dd1b23bc06696","user":{"login":"bookmd","id":11821632,"avatar_url":"https://avatars.githubusercontent.com/u/11821632?v=3","gravatar_id":"","url":"https://api.github.com/users/bookmd","html_url":"https://github.com/bookmd","followers_url":"https://api.github.com/users/bookmd/followers","following_url":"https://api.github.com/users/bookmd/following{/other_user}","gists_url":"https://api.github.com/users/bookmd/gists{/gist_id}","starred_url":"https://api.github.com/users/bookmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bookmd/subscriptions","organizations_url":"https://api.github.com/users/bookmd/orgs","repos_url":"https://api.github.com/users/bookmd/repos","events_url":"https://api.github.com/users/bookmd/events{/privacy}","received_events_url":"https://api.github.com/users/bookmd/received_events","type":"Organization","site_admin":false},"repo":{"id":56669845,"name":"mongoose-meteor-account","full_name":"bookmd/mongoose-meteor-account","owner":{"login":"bookmd","id":11821632,"avatar_url":"https://avatars.githubusercontent.com/u/11821632?v=3","gravatar_id":"","url":"https://api.github.com/users/bookmd","html_url":"https://github.com/bookmd","followers_url":"https://api.github.com/users/bookmd/followers","following_url":"https://api.github.com/users/bookmd/following{/other_user}","gists_url":"https://api.github.com/users/bookmd/gists{/gist_id}","starred_url":"https://api.github.com/users/bookmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bookmd/subscriptions","organizations_url":"https://api.github.com/users/bookmd/orgs","repos_url":"https://api.github.com/users/bookmd/repos","events_url":"https://api.github.com/users/bookmd/events{/privacy}","received_events_url":"https://api.github.com/users/bookmd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bookmd/mongoose-meteor-account","description":"Meteor account system implemented in Mongoose","fork":false,"url":"https://api.github.com/repos/bookmd/mongoose-meteor-account","forks_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/forks","keys_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/teams","hooks_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/hooks","issue_events_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/events{/number}","events_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/events","assignees_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/assignees{/user}","branches_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/branches{/branch}","tags_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/tags","blobs_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/refs{/sha}","trees_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/statuses/{sha}","languages_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/languages","stargazers_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/stargazers","contributors_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/contributors","subscribers_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/subscribers","subscription_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/subscription","commits_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/commits{/sha}","git_commits_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/commits{/sha}","comments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/comments{/number}","issue_comment_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/comments{/number}","contents_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/contents/{+path}","compare_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/merges","archive_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/downloads","issues_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues{/number}","pulls_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls{/number}","milestones_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/milestones{/number}","notifications_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/labels{/name}","releases_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/releases{/id}","deployments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/deployments","created_at":"2016-04-20T08:30:48Z","updated_at":"2016-07-10T05:24:56Z","pushed_at":"2016-07-10T15:59:11Z","git_url":"git://github.com/bookmd/mongoose-meteor-account.git","ssh_url":"git@github.com:bookmd/mongoose-meteor-account.git","clone_url":"https://github.com/bookmd/mongoose-meteor-account.git","svn_url":"https://github.com/bookmd/mongoose-meteor-account","homepage":null,"size":11,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":10,"default_branch":"master"}},"base":{"label":"bookmd:master","ref":"master","sha":"8d8ae9defb3306e380b303d50d1db7849e4c1c24","user":{"login":"bookmd","id":11821632,"avatar_url":"https://avatars.githubusercontent.com/u/11821632?v=3","gravatar_id":"","url":"https://api.github.com/users/bookmd","html_url":"https://github.com/bookmd","followers_url":"https://api.github.com/users/bookmd/followers","following_url":"https://api.github.com/users/bookmd/following{/other_user}","gists_url":"https://api.github.com/users/bookmd/gists{/gist_id}","starred_url":"https://api.github.com/users/bookmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bookmd/subscriptions","organizations_url":"https://api.github.com/users/bookmd/orgs","repos_url":"https://api.github.com/users/bookmd/repos","events_url":"https://api.github.com/users/bookmd/events{/privacy}","received_events_url":"https://api.github.com/users/bookmd/received_events","type":"Organization","site_admin":false},"repo":{"id":56669845,"name":"mongoose-meteor-account","full_name":"bookmd/mongoose-meteor-account","owner":{"login":"bookmd","id":11821632,"avatar_url":"https://avatars.githubusercontent.com/u/11821632?v=3","gravatar_id":"","url":"https://api.github.com/users/bookmd","html_url":"https://github.com/bookmd","followers_url":"https://api.github.com/users/bookmd/followers","following_url":"https://api.github.com/users/bookmd/following{/other_user}","gists_url":"https://api.github.com/users/bookmd/gists{/gist_id}","starred_url":"https://api.github.com/users/bookmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bookmd/subscriptions","organizations_url":"https://api.github.com/users/bookmd/orgs","repos_url":"https://api.github.com/users/bookmd/repos","events_url":"https://api.github.com/users/bookmd/events{/privacy}","received_events_url":"https://api.github.com/users/bookmd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bookmd/mongoose-meteor-account","description":"Meteor account system implemented in Mongoose","fork":false,"url":"https://api.github.com/repos/bookmd/mongoose-meteor-account","forks_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/forks","keys_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/teams","hooks_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/hooks","issue_events_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/events{/number}","events_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/events","assignees_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/assignees{/user}","branches_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/branches{/branch}","tags_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/tags","blobs_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/refs{/sha}","trees_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/statuses/{sha}","languages_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/languages","stargazers_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/stargazers","contributors_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/contributors","subscribers_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/subscribers","subscription_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/subscription","commits_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/commits{/sha}","git_commits_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/git/commits{/sha}","comments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/comments{/number}","issue_comment_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/comments{/number}","contents_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/contents/{+path}","compare_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/merges","archive_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/downloads","issues_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues{/number}","pulls_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls{/number}","milestones_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/milestones{/number}","notifications_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/labels{/name}","releases_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/releases{/id}","deployments_url":"https://api.github.com/repos/bookmd/mongoose-meteor-account/deployments","created_at":"2016-04-20T08:30:48Z","updated_at":"2016-07-10T05:24:56Z","pushed_at":"2016-07-10T15:59:11Z","git_url":"git://github.com/bookmd/mongoose-meteor-account.git","ssh_url":"git@github.com:bookmd/mongoose-meteor-account.git","clone_url":"https://github.com/bookmd/mongoose-meteor-account.git","svn_url":"https://github.com/bookmd/mongoose-meteor-account","homepage":null,"size":11,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2"},"html":{"href":"https://github.com/bookmd/mongoose-meteor-account/pull/2"},"issue":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/2"},"comments":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/bookmd/mongoose-meteor-account/statuses/a9bb8245fbe9cd0809f8978c824dd1b23bc06696"}}}}
{"actor":{"display_login":"rom10"}}