-
Install Java 21 with SDKMan (optional)
sdk install java 21.0.5-tem sdk use java 21.0.5-tem
-
Configure the Auth0 web application with the following callback URL
http://localhost:8080/login/oauth2/code/auth0 -
Create a user in your Auth0 account that can access the configured application.
-
Create a
src/main/resources/application-local.ymlconfig file with the following:spring: security: oauth2: client: registration: auth0: client-id: "YOUR_AUTH0_APP_CLIENT_ID" client-secret: "YOUR_AUTH0_APP_CLIENT_SECRET" scope: - profile - email - openid provider: auth0: issuer-uri: https://YOUR_AUTH0_TENANT_NAME.us.auth0.com/
NoteA different OIDC provider like Google or Okta can be used instead of Auth0
./gradlew bootTestRun --args='--spring.profiles.active=local'Go to http://localhost:8080 and test it out
This repo is available under the MIT License. See LICENSE for the full license text.