Skip to content

Commit

Permalink
chore(authentication): Add token in the link for activating a user
Browse files Browse the repository at this point in the history
- Integrated the generated token in the link sent through email as a query parameter
[Deleivers #167055602]
  • Loading branch information
ericnyirimana committed Jul 3, 2019
1 parent a97d894 commit 9143ef1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/userHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ class UserHelper {
* Send verification email
* @function sendVerificationEmail
* @param {string} email - user email
* @param {string} token - token
* @return {boolean} has sent
* @static
*/
static async sendVerificationEmail(email) {
const userToken = helper.tokenGenerator(30);

const link = `${process.env.BASE_URL}/api/v1/users/verification?token=${userToken}&email=${email}`;
const link = `${process.env.FRONTEND_URL}/verification?token=${userToken}&email=${email}`;
const info = {
email,
subject: 'Author Heaven Email Verification',
Expand Down

0 comments on commit 9143ef1

Please sign in to comment.