Skip to content

REST API - Login/registration - complete backend using Spring Boot

Notifications You must be signed in to change notification settings

caiogmello/user-login-registration

Repository files navigation

Login/registration complete backend using Spring Boot 🍃


Diagram:

Untitled


Dependencies used:

  • Spring Boot DevTools;
  • Lombok;
  • Spring Web (MVC);
  • Spring Security;
  • Spring Data JPA;
  • PostgreSQL Driver;
  • Java Mail Sender.

How works:

It’s a complete REST API backend, that saves personal data, like email and password, and sends a confirmation email using a unique generated token, that expires in 15 minutes.


How to use:

First, you do a registration using a normal request:

Requesting

You can make a POST request using postman on the address:

http://localhost:8080/api/v1/registration”.

Example:

Untitled

The POST request will return a unique generated token.


Mail sending and Login interface

To use the mail sending you will have to install and run MailDev:

$ npm install -g maildev
$ maildev

Then, open the MailDev address: “http://0.0.0.0:1080/#/"

A new confirmation email will be there:

Untitled

Click on the link in less than 15 minutes and the account will be enabled.

After that, open the address: “http://localhost:8080/login

Untitled

And sign in with the credencials used on the registration.


Reference:

Amigoscode - Java Tutorial - Complete User Login and Registration Backend + Email Verification: https://www.youtube.com/watch?v=QwQuro7ekvc

Releases

No releases published

Packages

No packages published

Languages