How can I use PKCE with spring boot adapter?

Hello,
I’m a newbie to OIDC and OAuth and want to integrate OIDC to my web app. I installed keycloak 10.0.1 and tested the example code of [https://www.baeldung.com/spring-boot-keycloak], that works fine. Now I come to know that it’s good to apply PKCE and have searched for any code snippet but failed.
How can I use PKCE with spring boot application?
(I’m using spring boot 2.2.6)

I found this link explaining PKCE integration with Spring Boot. I am also not in favor of using keycloak adapter for spring boot as explained in this tutorial. Spring Boot Resource Server is enough to validate the token received in API request. Just add the proper links for Checking the Validity of Token from Keycloak and that’s all. I hope you enjoy working with following link.

PKCE wih Keycloak and Spring Security

1 Like