Skip to content

Spring Boot & MongoDB Login and Registration example with JWT, Spring Security, Spring Data MongoDB

Notifications You must be signed in to change notification settings

bezkoder/spring-boot-login-mongodb

Repository files navigation

Spring Boot Login and Registration example with MongoDB

Build a Spring Boot Auth with HttpOnly Cookie, JWT, Spring Security and Spring Data MongoDB. You'll know:

  • Appropriate Flow for User Login and Registration with JWT
  • Spring Boot Rest API Architecture with Spring Security
  • How to configure Spring Security to work with JWT
  • How to define Data Models and association for User Login and Registration
  • Way to get and generate Cookies for Token
  • Way to use Spring Data MongoDB to interact with MongoDB Database

User Registration, Login and Authorization process.

spring-boot-mongodb-login-example-flow

Spring Boot Rest API Architecture with Spring Security

You can have an overview of our Spring Boot Server with the diagram below:

spring-boot-mongodb-login-example-architecture

For more detail, please visit:

Spring Boot Login and Registration example with MongoDB

Working with Front-end:

Angular 12 / Angular 13 / Angular 14 / Angular 15 / Angular 16 / Angular 17

React / React Redux

More Practice:

Spring Boot with MongoDB CRUD example using Spring Data

Spring Boot MongoDB Pagination & Filter example

Spring Boot + GraphQL + MongoDB example

Spring Boot Repository Unit Test with @DataJpaTest

Spring Boot Rest Controller Unit Test with @WebMvcTest

Validation: Spring Boot Validate Request Body

Documentation: Spring Boot and Swagger 3 example

Caching: Spring Boot Redis Cache example

Fullstack:

Vue.js + Spring Boot + MongoDB example

Angular 8 + Spring Boot + MongoDB example

Angular 10 + Spring Boot + MongoDB example

Angular 11 + Spring Boot + MongoDB example

Angular 12 + Spring Boot + MongoDB example

Angular 13 + Spring Boot + MongoDB example

Angular 14 + Spring Boot + MongoDB example

Angular 15 + Spring Boot + MongoDB example

Angular 16 + Spring Boot + MongoDB example

Angular 17 + Spring Boot + MongoDB example

React + Spring Boot + MongoDB example

Run both Back-end & Front-end in one place:

Integrate Angular with Spring Boot Rest API

Integrate React with Spring Boot Rest API

Integrate Vue with Spring Boot Rest API

Run Spring Boot application

mvn spring-boot:run