ecleipteon / Thalos

Secure approach to secure file storage in untrusted environments.
Apache License 2.0
37 stars 6 forks source link

Send confirmation code by Email #7

Open ecleipteon opened 7 years ago

ecleipteon commented 7 years ago

In order to avoid spam and fake users, people must activate their accounts just after the registration. At this time the activation link is temporarily provided by a HTML page just after the registration process. We should implement as soon as possible a function to send the activation link to the user email address.

microwavestine commented 7 years ago

Could you point to relevant files / codes (where activation link is generated in HTML page)? :) Thanks

ecleipteon commented 7 years ago

Hi @ckylee , Thank you for your interest in Thalos.

During the user creation process an activation token is generated so that the user can "enable" his account.

https://github.com/ecleipteon/Thalos/blob/e7d58322df5df23a65d47cb71b4e89398b4c98f8/controllers/passport.js#L33

At this time the token is served trough an HTML page for simplicity, here is the call stack.

The router. https://github.com/ecleipteon/Thalos/blob/e7d58322df5df23a65d47cb71b4e89398b4c98f8/routes/users.js#L69

and the view

https://github.com/ecleipteon/Thalos/blob/e9809fad8aefd3756e1ce2b3502f9d6fda42d04f/views/sendData.pug#L3

The purpose of this issue is writing the code needed to send the activation link straight to the user mailbox since serving it trough HTML page doesn't avoid any kind of spam.

Hope it is all clear, please let me know if I miss something :)