This recipe creates the facebook-login-oauth2 project, which is available on GitHub in the Chapter06 folder. Import the generated project as a Maven project into your IDE and follow these steps:
- Open the pom.xml file and add the following extra dependencies for Spring Security OAuth2 and Thymeleaf extras for Spring Security (note that we are declaring the most up-to-date version of Spring Security OAuth2 at the time of writing this). I am assuming that you have already imported the starters for Web, Thymeleaf, JPA, H2, and Security:
<dependency> <groupId>org.thymeleaf.extras</groupId> <artifactId>thymeleaf-extras-springsecurity4</artifactId></dependency><dependency> <groupId>org.springframework.security.oauth</groupId>