I am getting an error when I try to verify the JWT that was just issued in React. The top message is "Error while resolving signing key for kid “kKpKqOkzm8SLhje98jw0o9cZkDUCNESal6tHuabf4Ts”. The inner message is “Error: SSL Error: {oktaURL}/oauth2/default/v1/keys does not support SSL”, however if I request the keys url directly it happily responds using SSL. Any ideas what might be causing the issue? I want to inspect the JWT for a claim but currently can’t because of this issue.
const verifier = new OktaJwtVerifier({
issuer: '{oktaURL}/oauth2/default',
clientId: 'xxxxx'
});
const accessToken = await this.props.auth.getAccessToken()
verifier.verifyAccessToken(accessToken, 'api://default')
.then(jwt => {
// the token is valid (per definition of 'valid' above)
console.log("Claims:",jwt.claims);
})
.catch(err => {
console.log(err)
// a validation failed, inspect the error
});
Error: SSL Error: {oktaURL}/oauth2/default/v1/keys does not support SSL
at Request.push…/node_modules/request/request.js.Request.onRequestResponse (http://localhost:3000/static/js/1.chunk.js:127597:24)
at push…/node_modules/stream-http/lib/request.js.module.exports.emit (http://localhost:3000/static/js/1.chunk.js:40949:5)
at push…/node_modules/stream-http/lib/request.js.module.exports.push…/node_modules/stream-http/lib/request.js.ClientRequest._connect (http://localhost:3000/static/js/1.chunk.js:145627:8)
at http://localhost:3000/static/js/1.chunk.js:145526:12