I am using Spring boot as my resource server and react as my SPA. I made an OIDC app in okta and getting the access token from the OKTA. Then, I am sending this token my spring boot resource server but there I am getting Unauthorized.
My Spring boot config.
okta.oauth2.issuer= https://navi-2020.okta.com
okta.oauth2.clientId=0oa57fbt3r5I638u94x6
okta.oauth2.audience=0oa57fbt3r5I638u94x6
My React config:
const config = {
issuer: ‘https://navi-2020.okta.com’,
redirectUri: window.location.origin + ‘/implicit/callback’,
clientId: “0oa57fbt3r5I638u94x6”,
pkce: true
};
My app in okta:
This is the error i get everytime
Bearer error=“invalid_token”, error_description=“An error occurred while attempting to decode the Jwt: Invalid token”, error_uri=“https://tools.ietf.org/html/rfc6750#section-3.1”
I have used Okta-spring-boot-starter as my dependency.
It is working fine with this server:(with all corresponding config)
But creating problem when i am doing the above mentioned approach.
Please help