https://github.com/afa-farkhod/spring-boot-email-verification
Spring Boot Login and Registration to PostgreSQL Database with Email Verification Api
https://github.com/afa-farkhod/spring-boot-email-verification
gradle java maildev postgresql spring-security springboot
Last synced: 2 months ago
JSON representation
Spring Boot Login and Registration to PostgreSQL Database with Email Verification Api
- Host: GitHub
- URL: https://github.com/afa-farkhod/spring-boot-email-verification
- Owner: afa-farkhod
- License: apache-2.0
- Created: 2023-09-23T22:53:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-30T14:17:55.000Z (over 1 year ago)
- Last Synced: 2025-02-02T01:13:29.790Z (4 months ago)
- Topics: gradle, java, maildev, postgresql, spring-security, springboot
- Language: Java
- Homepage:
- Size: 214 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring-Boot-Email-Verification
Spring Boot Login and Registration to PostgreSQL Database with Email Verification Api- Scenario: following is the complete backend application for user login and registration using Spring Boot which also includes email verification link. So person comes to register with the firstname, lastname, email and password. Which are then saved on Database. In fact, user gets authorization token back from the server as the proof of registration. Then there goes email verification link to the user's email with the expiration period of 15 minute.

## [Implementation]()
- First we create new Spring project with `Spring Initializer` by using the `IntelliJ IDEA` as following:
![]()
- After that, we set required dependencies and Spring Boot version:
![]()
- We run the Spring application first:
- Then with the `Postman` client we send new user registration request as following:

- After successful registration, we can check the Database:

- And on Postman we get `token` from the server as the meaning of successful registration:

- To simulate the email verification part, we use [maildev](https://github.com/maildev/maildev) which is the simple way to test project's generated email during development, with an easy to use web interface that runs on local machine built on top of Node.js:
```
# first clone the GitHub repository
$ git clone https://github.com/maildev/maildev.git
# then run the following command
$ npm install -g maildev
```- Then we can check successful installation by running `maildev`:

- maildev page looks as following:

- Then when we press the `Activate Now` , it redirects to the confirmation page:
![]()