This sample project shows how to authenticate users based on credentials maintained in a Postgresql database. Passwords are hashed using Argon2. Look at the SecurityConfig.java for Argon2 input parameters used. To run with support for hot swap during development, use the dev profile as follows: mvn spring-boot:run -Dspring-boot.run.profiles=dev User/Pasword (as defined in resources/data.sql) admin: abc123 user1: abc123 Key points: 1. pom.xml dependencies 2. config/SecurityConfig.java - Can be used to modify Spring Security behavior. 3. user package Java source files - serivice/CustomUserDetailsService.java is the key source file that defines a UserDetailsService bean that fetches user details from UserRepository (which fetches data from database using JPA) Misc: Online Argon2 hash generator: https://argon2.online/