Principal is empty on Spring Boot Example


I’m new to Auth0 but it seems I succeeded setup an account and a “Regular Application”. :wink:

What have I done:

  1. Created a tenant
  2. Downloaded the Spring Boot Sample Application
  3. Extracted it to my Eclipse IDE
  4. Added redirect-uri to application.yml because without that information an error page appears
  5. Setup SSL in the application because http is not allowed as callback uris in the management interface
  6. Added this redirect-uri to “allowed callback uris” in the manage interface
  7. Created a dummy user
  8. Setup 2FA with Auth0 Guardian App

When I start the spring application everything seems fine

  1. I connect to https://localhost:3000 then I click to “login” button.
  2. Login Page from my tenant on appears
  3. I login with the credentials of my dummy user
  4. QRCode for 2FA appears → Scanning it to guardian app
  5. Push Notification appears in Guardian App
  6. Clicking on “Allow”
  7. Redirecting Back to application but when I set a debug point on HomeController the parameter “principal” is null everytime

For me it seems the application isn’t getting the userinfo.
In the index.html the “profile” and “logout” button keeps hidden, because “isAuthenticated” seems to be false.

Any help would be appreciated.

Best regards


By adding the redirect_uri “https://localhost:3000/login/oauth2/code/auth0” in the application.yml and in the allowed callbacks in the management frontent it worked.

Could you please add this redirect_uri to the yml file so you example will work at the first start.

Thanky you

Can you share the link to the example so I can ping the right team to update it? Thanks!