Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Spring HATEOAS to a project with Okta Boot Starter makes it fail to start #607

Open
1 of 2 tasks
mraible opened this issue Sep 29, 2023 · 0 comments
Open
1 of 2 tasks

Comments

@mraible
Copy link
Contributor

mraible commented Sep 29, 2023

I'm submitting a

  • bug report
  • feature request

Background info

If I have a project with the following dependencies:

dependencies {
    implementation 'me.paulschwarz:spring-dotenv:4.0.0'
    implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
    implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    implementation 'com.okta.spring:okta-spring-boot-starter:3.0.5'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

It starts just fine if I have my OKTA_* environment variables provided in an .env file and mapped in application.properties. However, once I had the following dependency (because I want to configure WebClient to handle HATEOAS), it fails to start.

implementation 'org.springframework.boot:spring-boot-starter-hateoas'

The error is:

Description:

Parameter 0 of constructor in com.example.apigateway.config.SecurityConfiguration required a bean of type 'org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository' that could not be found.

Action:

Consider defining a bean of type 'org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository' in your configuration.

> Task :boot run FAILED

If I remove the dependency, the app starts fine.

Expected behavior

I should be able to use Spring HATEOAS with the Okta Spring Boot starter.

Steps to reproduce

git clone https://github.com/oktadev/auth0-java-microservices-examples.git
cd auth0-java-microservices-examples/spring-boot-gateway-webflux

Then, follow the instructions in the README to configure Auth0 and watch it fail when it starts. Remove the spring-boot-starter-hateoas dependency, and it starts just fine.

SDK Version

3.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant