-
Send an email with Spring Boot and Thymeleaf
Using Spring Boot and Thymeleaf, it’s easy to send HTML emails to your users. This post will show the configuration and logic to send an email. We won’t go into details on how to setup the template, that’s for another time. Project setup Assuming you already use Spring Boot, we need to add two dependencies…
-
Spring Boot – Load users from database
This is the third article in a series on authentication with Spring Boot. In the first article we authenticated using social networks, and allowed any user to access our application. In the second article we used inMemoryAuthentication for users that used the login form. In essence, we hardcoded our users. This article is about adding…
-
Spring Boot login with a form
Previously I wrote about securing your application with social login. But not everybody has a social account. In this article we’re going to add formlogin to the application. Formlogin simply means that your users can log in with a username and password. We’re going to keep it as simple as possible, with in-memory authentication. Adding…
-
Spring Boot and Oauth2 with Thymeleaf
Spring has a good tutorial explaining how to authenticate with your application using one or more external authentication providers, like GitHub or Google. This tutorial uses a single page application with a Rest endpoint. For a personal project I didn’t want a single page application, I wanted to use Thymeleaf. During implementation I discovered a…