Scala Liftweb : Use Forgot Password Inbuilt Functionality to send Email with Unique Token

Table of contents
Reading Time: < 1 minute

If you are implementing Forgot password functionality in your web application using Liftweb and you have such a scenario where you have to send redirect URL with unique token in Email , Liftweb with Scala provides a wonderful functionality to handle this .

1) Write a function to send URL with unique token in Email .

This function will generate a Unique token url and save unique token in collection.
2) Override handleLoginToken function according to your requirement .

When user would click on URL , he would be redirected to password page . After redirecting , user session would be true and you can get current user . Now ask user for his new password and replace with old password .
Once URL is clicked by user , it would be expired and deleted from login token collection . It can not be used again .

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.

1 thought on “Scala Liftweb : Use Forgot Password Inbuilt Functionality to send Email with Unique Token2 min read

Comments are closed.