Tried by placing default auth server in audience , but it throws the same
some log from spring boot
org.springframework.security.oauth2.core.OAuth2AuthenticationException: An error occurred while attempting to decode the Jwt: Invalid token
at org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider.authenticate(JwtAuthenticationProvider.java:92) ~[spring-security-oauth2-resource-server-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:175) ~[spring-security-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
Caused by: com.nimbusds.jose.RemoteKeySourceException: Couldn’t retrieve remote JWK set: org.springframework.web.client.ResourceAccessException: I/O error on GET request for “https://dev-88289596.okta.com/oauth2/default/v1/keys”: sun.security.validator.ValidatorException: 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: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Followed Securing Angular + Spring Boot Application with Okta | by Raghavendra Bhat | Medium ( code from git hub, it throws above error)
followed this Build a CRUD App with Angular 9 and Spring Boot 2.2 | Okta Developer it was giving invalid token ( i used spring boot maven instead of gradle Kotlin)