{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/comments/47308613","id":47308613,"diff_hunk":"@@ -300,15 +300,27 @@ PassportConfigurator.prototype.configureProvider = function(name, options) {\n                 }\n               } else {\n                 user.hasPassword(password, function(err, ok) {\n-                  if (ok) {\n-                    done(null, userProfile);\n+                  if (ok) {          \n+                     if (!user.emailVerified) \n+                      {\n+                          // Fail to log in if email verification is not done yet\n+                          return done(null, false, {message: 'User Email has not been verified.'});\n+                          err = new Error('login failed as the email has not been verified');","path":"lib/passport-configurator.js","position":11,"original_position":11,"commit_id":"f3afa98758f57471bb6f637cd934d452aad9c753","original_commit_id":"f3afa98758f57471bb6f637cd934d452aad9c753","user":{"login":"loay","id":1986928,"avatar_url":"https://avatars.githubusercontent.com/u/1986928?v=3","gravatar_id":"","url":"https://api.github.com/users/loay","html_url":"https://github.com/loay","followers_url":"https://api.github.com/users/loay/followers","following_url":"https://api.github.com/users/loay/following{/other_user}","gists_url":"https://api.github.com/users/loay/gists{/gist_id}","starred_url":"https://api.github.com/users/loay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loay/subscriptions","organizations_url":"https://api.github.com/users/loay/orgs","repos_url":"https://api.github.com/users/loay/repos","events_url":"https://api.github.com/users/loay/events{/privacy}","received_events_url":"https://api.github.com/users/loay/received_events","type":"User","site_admin":false},"body":" I tested using `loopback-example-passport` and test using this branch of loopback-component-passport`\r\nit gave the correct behavior for verified and non-verified email. Where's the mistake?","created_at":"2015-12-11T00:40:48Z","updated_at":"2015-12-11T00:40:48Z","html_url":"https://github.com/strongloop/loopback-component-passport/pull/110#discussion_r47308613","pull_request_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/comments/47308613"},"html":{"href":"https://github.com/strongloop/loopback-component-passport/pull/110#discussion_r47308613"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110","id":53049573,"html_url":"https://github.com/strongloop/loopback-component-passport/pull/110","diff_url":"https://github.com/strongloop/loopback-component-passport/pull/110.diff","patch_url":"https://github.com/strongloop/loopback-component-passport/pull/110.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/110","number":110,"state":"open","locked":false,"title":"email verification fix","user":{"login":"loay","id":1986928,"avatar_url":"https://avatars.githubusercontent.com/u/1986928?v=3","gravatar_id":"","url":"https://api.github.com/users/loay","html_url":"https://github.com/loay","followers_url":"https://api.github.com/users/loay/followers","following_url":"https://api.github.com/users/loay/following{/other_user}","gists_url":"https://api.github.com/users/loay/gists{/gist_id}","starred_url":"https://api.github.com/users/loay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loay/subscriptions","organizations_url":"https://api.github.com/users/loay/orgs","repos_url":"https://api.github.com/users/loay/repos","events_url":"https://api.github.com/users/loay/events{/privacy}","received_events_url":"https://api.github.com/users/loay/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-08T22:35:35Z","updated_at":"2015-12-11T00:40:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8213cff06e31242006252f1651ba88a0255ace5","assignee":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/110/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-component-passport/statuses/f3afa98758f57471bb6f637cd934d452aad9c753","head":{"label":"strongloop:issue107_emailVerify","ref":"issue107_emailVerify","sha":"f3afa98758f57471bb6f637cd934d452aad9c753","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":19863257,"name":"loopback-component-passport","full_name":"strongloop/loopback-component-passport","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-component-passport","description":"LoopBack passport integration to support third party logins and account linking","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-component-passport","forks_url":"https://api.github.com/repos/strongloop/loopback-component-passport/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-component-passport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-component-passport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-component-passport/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-component-passport/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-component-passport/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-component-passport/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-component-passport/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-component-passport/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-component-passport/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-component-passport/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-component-passport/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-component-passport/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-component-passport/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-component-passport/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-component-passport/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-component-passport/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-component-passport/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-component-passport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-component-passport/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-component-passport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-component-passport/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-component-passport/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-component-passport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-component-passport/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-component-passport/releases{/id}","created_at":"2014-05-16T16:30:25Z","updated_at":"2015-12-04T14:21:54Z","pushed_at":"2015-12-11T00:24:44Z","git_url":"git://github.com/strongloop/loopback-component-passport.git","ssh_url":"git@github.com:strongloop/loopback-component-passport.git","clone_url":"https://github.com/strongloop/loopback-component-passport.git","svn_url":"https://github.com/strongloop/loopback-component-passport","homepage":null,"size":409,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":45,"forks":96,"open_issues":45,"watchers":56,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"aa0ccab8040ea91ea48d03c93c8dbdd6dd5aa258","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":19863257,"name":"loopback-component-passport","full_name":"strongloop/loopback-component-passport","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-component-passport","description":"LoopBack passport integration to support third party logins and account linking","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-component-passport","forks_url":"https://api.github.com/repos/strongloop/loopback-component-passport/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-component-passport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-component-passport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-component-passport/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-component-passport/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-component-passport/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-component-passport/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-component-passport/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-component-passport/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-component-passport/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-component-passport/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-component-passport/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-component-passport/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-component-passport/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-component-passport/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-component-passport/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-component-passport/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-component-passport/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-component-passport/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-component-passport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-component-passport/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-component-passport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-component-passport/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-component-passport/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-component-passport/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-component-passport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-component-passport/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-component-passport/releases{/id}","created_at":"2014-05-16T16:30:25Z","updated_at":"2015-12-04T14:21:54Z","pushed_at":"2015-12-11T00:24:44Z","git_url":"git://github.com/strongloop/loopback-component-passport.git","ssh_url":"git@github.com:strongloop/loopback-component-passport.git","clone_url":"https://github.com/strongloop/loopback-component-passport.git","svn_url":"https://github.com/strongloop/loopback-component-passport","homepage":null,"size":409,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":45,"forks":96,"open_issues":45,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110"},"html":{"href":"https://github.com/strongloop/loopback-component-passport/pull/110"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/110"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-component-passport/statuses/f3afa98758f57471bb6f637cd934d452aad9c753"}}}}