Tagged: #springsecurity

Spring Boot – How to solve OAuth2 ERR_TOO_MANY_REDIRECTS

#Problem When redirecting back to your application after a successful OAuth2 authentication, the following error occurs: #Solution This error occurs when the redirect URL set under the authorization service(Google, Facebook … etc) is not defined as a permitted URL inside your application. The permitted URL is the one which can be accessed without authentication. When the authorization service redirects to...

Spring Boot – How to solve OAuth2 REDIRECT_URI_MISMATCH

#Problem When trying to authenticate a user using OAuth2 through a third-party service like (Google, Facebook .. etc.), the following error occurs: #Solution redirect_uri_mismatch error occurs when the redirect URL defined for your application at the authorization service doesn’t match with the value of parameter “redirect_uri” passed by your request. When integrating OAuth2 with Spring Boot, the default value of redirect_uri...

Spring Boot + Spring Security + OAuth2

In this tutorial we explain how to secure a Spring Boot application using OAuth2. If you follow the steps in order, you’ll get a fully working secured application which authenticates user requests through Google API. Prerequisites: Eclipse IDE (neon release) Maven 4 Java 1.8 Spring Boot 2.0.0 1- Create maven project Open eclipse then create a new maven project and...