K
Kinde3mo ago
Eternal

Missing KindeSdkClient when using kinde-springboot-starter

Following the Java SDK docs, at the startup it complains of a missing KindeSdkClient, but there is no mention of this on the Java SDK docs or on Github. Is there a full documentation for the spring boot integration for authorization? The error messages: "Parameter 0 of method setKindeSdkClient in com.kinde.spring.KindeOAuth2AutoConfig required a bean of type 'com.kinde.spring.sdk.KindeSdkClient' that could not be found."
1 Reply
Roshan
Roshan3mo ago
Hi Eternal. I'll check in with our SDK team about this get back to you. They're in another timezone to me, so appreciate your patience. Hi Eternal,

Thanks for reaching out, and I appreciate you sharing the error.
Parameter 0 of method setKindeSdkClient in com.kinde.spring.KindeOAuth2AutoConfig required a bean of type 'com.kinde.spring.sdk.KindeSdkClient' that could not be found.
Parameter 0 of method setKindeSdkClient in com.kinde.spring.KindeOAuth2AutoConfig required a bean of type 'com.kinde.spring.sdk.KindeSdkClient' that could not be found.
indicates that Spring Boot is expecting a bean of type KindeSdkClient, which it cannot locate at runtime. This typically means: - The KindeSdkClient is not being created or registered as a Spring Bean. - The @EnableKinde or equivalent configuration is missing. - The starter or SDK dependency may not have been correctly included.

Correct Setup for Spring Boot Integration To fix this, please ensure: Use the Spring Boot Starter Dependency Add this to your pom.xml:
<dependency>

<dependency>

    <groupId>com.kinde.spring</groupId>

    <groupId>com.kinde.spring</groupId>

    <artifactId>kinde-springboot-starter</artifactId>

    <artifactId>kinde-springboot-starter</artifactId>

    <version>[2.0.1,)</version>

    <version>[2.0.1,)</version>

</dependency>

</dependency>

Note: Do not mix this with the older kinde-java-sdk v1 if you are using the Spring Boot starter.

Configure via application.yaml or environment variables Example for application.yaml:
kinde:

kinde:

  oauth2:

  oauth2:

    domain: https://your-subdomain.kinde.com

    domain: https://your-subdomain.kinde.com

    client-id: your-client-id

    client-id: your-client-id

    client-secret: your-client-secret

    client-secret: your-client-secret

    scopes: openid,email,profile

    scopes: openid,email,profile


Let Auto-Configuration Inject the Bean Once the above is set, the Spring Boot starter should auto-configure KindeSdkClient as a bean, resolving the missing dependency.

Please let us know if this helps.We’re happy to help troubleshoot further.

Did you find this page helpful?