I followed this tutorial to make a spring boot application and connect it to B2C - https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory-b2c-oidc
I can reach the MS log-in page where I could create my account or log in. On completing either, it throws the following error in my browser:
[invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: I/O error on POST request for "https://SAMPLENAME.b2clogin.com/SAMPLENAME.onmicrosoft.com/oauth2/v2.0/token": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
How could I resolve this?