Posts

Showing posts with the label OAuth2

Integrating LinkedIn Authentication in a Spring Boot 3 application

Image
To integrate LinkedIn authentication in a Spring Boot application with Spring Security, you can use OAuth 2.0 authentication to authenticate users via LinkedIn. Spring Security 6+ provides OAuth 2.0 support for integrating third-party login services like LinkedIn. Here’s how to set up LinkedIn authentication with Spring Boot 3 and Spring Security 6+. 1. Add Dependencies In your pom.xml, include the necessary dependencies for Spring Security and OAuth 2.0 support.   <dependencies>     <!-- Spring Boot Starter Web -->     <dependency>         <groupId> org.springframework.boot </groupId>         <artifactId> spring-boot-starter-web </artifactId>     </dependency>     <!-- Spring Boot Starter Security -->     <dependency>         <groupId> org.springframework.boot </groupId>         ...

Spring Boot - Spring Security - Google OAuth2 Login - Example

Image
Hello everyone, Today we are going to learn how to integrate the Google OAuth2 Sign-In by utilizing the Spring Boot application. More Spring Security practice: Registration and Login with Spring Boot + Spring Security + Thymeleaf Spring Boot-Authentication and Authorization with Spring Security & JWT Spring Security -GitHub OAuth2 Login - Example   Generate Google OAuth2 credentials from Google developer console 1. Log in to the Google developer console using your Google account 2. Navigate to the Credentials section on the left menu, and choose the OAuth client ID option 3. Choose the application type, In our case "Web application". 4. Then, provide application name, Authorized javascript origins, authorized redirect URIs, and select the create option 5. After clicking the create button, one modal will pop up with the Client ID and Client Secret. Now we have successfully created the auth client in the google developer console Creating a Simple Web Application Now we are...