Spring Boot OTP Email Login Example
Coding with Nam
0:00 / 0:00
Spring Boot OTP Email Login Example
25 863 просмотра · 6 лет назад
Coding with Nam
52,4 тыс. подписчиков
25 863 просмотра · 6 лет назад
In this video, I'd like to share with you guys my coding experience in implementing One-Time Password Email function for an existing Spring Boot application, for improved security.
Here are the strategies I use to implement one time password via email:
The application will send an e-mail containing OTP to the user upon suspicious login (can be determined by using Google ReCaptcha API).
The OTP is a random String (8-character length)
The OTP will expire after 5 minutes
The user must use the provided OTP to login instead of normal password (OTP login)
With this approach, no new technologies required so it's relatively easy to implement the one-time password feature based on Spring Boot.
Technologies:
Spring Boot Starter Web (Spring MVC) for web applications
Spring Data JPA & Hibernate for data access layer
Spring Security for authentication
Spring Mail for sending email containing OTP
Thymeleaf as template engine
HTML 5 & Bootstrap for responsive UI.
MySQL database
Software programs:
Java Development Kit (JDK)
Spring Tool Suite IDE (STS)
MySQL Community Server & MySQL Workbench
To read the corresponding article, go to https://www.codejava.net/frameworks/s...
#springsecurity #password #otp #springboot #java