/spring-boot-oauth2

Primary LanguageJavaScriptMIT LicenseMIT

Securing Spring Boot APIs and SPAs with OAuth 2.0

In this article, you will learn how to create and secure a jQuery SPA and a Spring Boot API using OAuth 2.0. You will start by scaffolding a new Spring Boot project. Then you will add some endpoints to it. After that, you will use Spring Security to secure the whole thing. Lastly, you will create a SPA (with jQuery) to consume the API. If needed, you can find the reference code developed throughout the article in this GitHub repository.

Read the full article here: Securing Spring Boot APIs and SPAs with OAuth 2.0

Running the Sample

This sample already include some Auth0 values that will enable you to run it in no time. Just clone this repo, move into the project root, and use Gradle to run the sample:

# clone the sample
git clone https://github.com/auth0-blog/spring-boot-oauth2.git

# move into the project root
cd spring-boot-oauth2

# run it
gradle bootRun