This is just simple test project I made to test how to use these 3 together. API is little complex as Auth0 does not provide nice clean API for single page server side applications.
If you want to play around with this project, you need to:
- Register yourself as developer to Auth0
- Create new Client under your account
- Copy your domain, client ID and client secret from Auth0
- You also need to get management token key if you want to manage your user accounts
- Create file
auth0.properties
tosrc/main/resources
, you can useauth0-default.properties
as your template - Compile project with
mvn clean install
- Start the Spring Boot app with
java -jar target/Auth0Demo.jar
- Go to
http://localhost:8081
with your browser
There is no online demo of this application, as Auth0 API is free only for 20 days.
Notice that you need to add your URLs to login and logout URL allowed lists on auth0.com.
More info:
- Auth0 Java APIs really want to have access to HttpServletRequest, and with Vaadin this is challenging when eg. Push (WebSocket is used). This is the reason why separate LoginUI has been made (without @Push).