Skip to content

okta-samples/auth0-spring-boot-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Spring Boot Web application secured by Auth0

OAuth 2.0 and OIDC with Auth0 by Okta

If you don't have a free Auth0 developer account, you can Sign up for one.

Once you have an account log in using Auth0 CLI.

$ auth0 login

Then, register your Spring Boot app on Auth0 using:

$ auth0 apps create \
  --name "Auth0 Spring Boot Sample" \
  --description "Auth0 Spring Boot Sample" \
  --type regular \
  --callbacks http://localhost:8080/login/oauth2/code/okta \
  --logout-urls http://localhost:8080
  --reveal

Configure the application. Update the src/main/resources/application.properties file with the following content:

# trailing `/` is important for issuer URI
okta.oauth2.issuer=YOUR_AUTH0_ORG_URI
okta.oauth2.client-id=YOUR_AUTH0_CLIENT_ID
okta.oauth2.audience=YOUR_AUTH0_ORG_URI/api/v2/

Run

OKTA_OAUTH2_CLIENT_SECRET=YOUR_AUTH0_CLIENT_SECRET ./gradlew bootRun

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Additional Links

These additional references should also help you:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published