Posts

Showing posts with the label Spring Security

Spring Boot - Spring Security - Okta OAuth2 Login - Example

Image
Hello everyone, Today we are going to learn how to integrate the Okta OAuth2 Sign-In by utilizing the Spring Boot application. M ore Spring Security topics: 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 Okta OAuth2 credentials   1.  Register Okta developer account  -   click here 2. Customize your goals 3.  After clicking the Customize Goals, one modal will pop up "Tell Us About Yourself" Save the details 4. Create a Web Application(Java) 5.  Create New App 6.  After clicking the Create New App, one modal will pop up "Create a new  app integration" Click the 'Next' Button 7. C hange the Redirect URI to http://localhost:8080/login/oauth2/code/okta  8.  After clicking the Save button, System will generate the Client ID and Client Secret and Okta domain. Now we have successfully created the auth client in

Registration and Login with Spring Boot + Spring Security + Thymeleaf

Image
In this section, we will learn how to create user registration and login using Spring boot, Spring security, Thymeleaf, JPA, and H2DB. The GitHub repository link is provided at the end of this tutorial. You can download the source code. Technologies used: Spring Boot 2.5.5  Spring Data JPA  Spring Security  Thymeleaf  Maven 3+  Java 17  H2 Database   User Interface User Registration Authentication Failed Authentication success Sign out Final Project Structure: Complete pom.xml: <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi :schemaLocation ="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion >4.0.0</ modelVersion > < parent > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-starter-pare