{"repo":"ashrawan/Spring-Security-OAuth-Example","free":true,"listed":false,"github":"https://github.com/ashrawan/Spring-Security-OAuth-Example","clone":"git clone https://github.com/ashrawan/Spring-Security-OAuth-Example.git","description":"Spring Security with OAuth2, and Custom JWT","language":"Java","stars":16,"topics":["jwt","oauth2-client","spring-security"],"license":null,"category":"auth-billing-email","readme_excerpt":"Spring Security OAuth Example This repository demonstrates how to combine OAuth2 logins with custom JWT support in a Spring Boot application. It includes sample configurations for Google, Facebook and GitHub authentication providers and a classic username/password flow with email verification. Project Layout The main entry point is SpringCustomizedStarterExampleApplication . Security is configured in WebSecurityConfig which sets up stateless JWT authentication, OAuth2 login flow and registers a custom filter that parses JWT tokens. Key Features - OAuth2 login with Google, Facebook and GitHub - Custom JWT tokens issued on login or OAuth2 success - Email based registration, verification and password reset using Freemarker templates - Repository and service layers built with Spring Data JPA Configuration Highlights See application.yml for database, mail and OAuth client settings. Beans such as PasswordEncoder and CorsConfigurationSource are declared in the configuration classes under config . Security Layer JWTAuthenticationFilter extracts tokens from the Authorization header. Tokens are created and validated by JWTTokenProvider . OAuth2 requests are handled by CustomOAuth2UserService along with success and failure handlers. Email Templates Welcome, verification and password reset emails use Freemarker templates found in src/main/resources/mail-templates . Getting Started Ensure you have a database (MySQL by default) and update OAuth credentials in application.yml . Run the appl","default_branch":null,"files":null,"tree":[],"storefront":"/r/ashrawan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ashrawan/Spring-Security-OAuth-Example/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}