I updated an Spring Authorization Server examples to Auth0 Okta and I can't make it work

Hi there,

I was trying to update the following example (https://www.baeldung.com/spring-security-oauth-auth-server) with a Spring Authz Server, Spring Resource Application and Spring Application to work with Auth0 but I’m having issues calling the resource server from the Client Application.

From the original example configuration, I only changed the client-id, client-secret and issuer-uri.

I didn’t add okta-spring-starter or any other new library, just spring security and spring oauth2 libraries are there.

My questions:

  • Do I need the Okta Spring starter?
  • In Auth0 I only have defined and App, not an API, is that enough? do I need the API for the resource server?

This is the error I get:

.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.web.reactive.function.client.WebClientResponseException$Unauthorized: 401 Unauthorized from GET] with root cause

Thanks in advance