{"action":"created","issue":{"url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/61","repository_url":"https://api.github.com/repos/whitef0x0/node-email-verification","labels_url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/61/comments","events_url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/61/events","html_url":"https://github.com/whitef0x0/node-email-verification/issues/61","id":211939086,"number":61,"title":"Feature to re-verify current users request to update email.","user":{"login":"doubleUTF","id":17230520,"avatar_url":"https://avatars3.githubusercontent.com/u/17230520?v=3","gravatar_id":"","url":"https://api.github.com/users/doubleUTF","html_url":"https://github.com/doubleUTF","followers_url":"https://api.github.com/users/doubleUTF/followers","following_url":"https://api.github.com/users/doubleUTF/following{/other_user}","gists_url":"https://api.github.com/users/doubleUTF/gists{/gist_id}","starred_url":"https://api.github.com/users/doubleUTF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doubleUTF/subscriptions","organizations_url":"https://api.github.com/users/doubleUTF/orgs","repos_url":"https://api.github.com/users/doubleUTF/repos","events_url":"https://api.github.com/users/doubleUTF/events{/privacy}","received_events_url":"https://api.github.com/users/doubleUTF/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-05T08:32:21Z","updated_at":"2017-06-16T13:14:19Z","closed_at":"2017-03-07T01:05:55Z","body":"I'm looking at the API and wondering if there is a method to update an existing user's email and require double-opt in for that as well. Since this only touches the permanent user model and not the temporary one, will this require a new method such as `nev.sendNewVerificationEmail(newEmail,oldEmail, url, callback(err,info))`?"},"comment":{"url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/comments/309023095","html_url":"https://github.com/whitef0x0/node-email-verification/issues/61#issuecomment-309023095","issue_url":"https://api.github.com/repos/whitef0x0/node-email-verification/issues/61","id":309023095,"user":{"login":"IvanMMM","id":3692403,"avatar_url":"https://avatars3.githubusercontent.com/u/3692403?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanMMM","html_url":"https://github.com/IvanMMM","followers_url":"https://api.github.com/users/IvanMMM/followers","following_url":"https://api.github.com/users/IvanMMM/following{/other_user}","gists_url":"https://api.github.com/users/IvanMMM/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanMMM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanMMM/subscriptions","organizations_url":"https://api.github.com/users/IvanMMM/orgs","repos_url":"https://api.github.com/users/IvanMMM/repos","events_url":"https://api.github.com/users/IvanMMM/events{/privacy}","received_events_url":"https://api.github.com/users/IvanMMM/received_events","type":"User","site_admin":false},"created_at":"2017-06-16T13:14:19Z","updated_at":"2017-06-16T13:14:19Z","body":"Any updates on this? I can realize it myself, but in this case let's discuss how it will work.\r\nI'm thinking about new collection `changingEmails` with next fields:\r\n`userId` - we'l send it back to user in our callback so user can select user to be updated;\r\n`newEmail` - we'l send it back to user in our callback too;\r\n`token` - to generate/get url link, obviously,\r\n`createdAt` - to let user decide TTL of change email request.\r\n\r\nUser requests email change, we create new object of emailChangeRequest in our db and send confirmation email. After user clicked on link we use same-as `confirmTempUser` function where we remove user object from our collection and pass values `userId` and `newEmail` to callback and let user decide how is to update his model. Is this Ok?\r\n\r\nAnd I have several questions and I hope you will help me solve it.\r\n\r\n1. What should we do if user sends `emailChangeRequest` second time?\r\n2. What if link is outdated and doc is removed from `changingEmails` collecton?"}}
{"actor":{"display_login":"IvanMMM"}}