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

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. Software Consultant @ Knoldus Software LLP. In his 5 years of experience he has become 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 Token

Leave a Reply

%d bloggers like this: