Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
How to hide a URL and token in email?

How can I hide the URL in my password reset email?

In my backend, this is how I have the URL setup:

accountService.js


async function sendPasswordResetEmail(account) {
  let message;
  const resetUrl = `https://www.example.com/accounts/reset-password?token=${account.resetToken.token}`;
  message = `<p>Please click the below link to reset your password, the link will be valid for 1 day:</p>
                   <p><a href="${resetUrl}">${resetUrl}</a></p>`;

  await sendEmail({
    to: account.email,
    subject: "Reset Password",
    html: `<h4>Reset Password Email</h4>
               ${message}`,
  });
}

When the email arrives to my inbox, the URL looks like this in the email:

https://www.example.com/accounts/reset-password?token=7a77f2273c599d2d49d1293bfb3b8a2a370528c6561189d6e229612eb51f1e0c219a3d92a20c8eda

I'd like to just show the user a link that says click here

How do I do this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just don't interpolate the URL into the text of the <a>?

<a href="${resetUrl}">Click Here</a>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!