spring-security-angular-csrf-login
spring-security-angular-csrf-login copied to clipboard
Shows login and CSRF protection with Angular and Spring Security 6
== Login, Logout, CSRF protection, Authentication Guards using Spring Security 6 and Angular
This project is a sample application that demonstrates how to use Spring Security 6 and Angular to implement login, logout, CSRF protection, and authentication guards.
The Session Management a CSRF protection went through a big change in Spring Security 6, the goal of this project is not to replace the https://docs.spring.io/spring-security/reference/[official documentation] but to provide a straightforward example to such use case.
Please refer to the https://docs.spring.io/spring-security/reference/5.8.0/migration/index.html[Preparing for 6.0 guide] for more details.
== How to run the backend application
Run ./mvnw spring-boot:run inside the backend folder. Or just use your favorite IDE.
The application runs on http://localhost:8080 by default.
== How to run the frontend application
Run ng serve or npm start on the frontend folder. Note that you need to have node, npm and optionally @angular/cli installed.
The application runs on http://localhost:4200 by default.