I am using verifyAccessToken method from https://www.npmjs.com/package/@okta/jwt-verifier in my AWS Lambda. I have Xray enabled and when i check the traces, I see that verifyAccessToken method is taking around 500ms and some times close to a second. Can someone tell me why it takes so much time and also help me with ways to reduce this time?
I know that there is a /introspect endpoint that Okta provides to validate the tokens. Okta suggests to use library but do you know if using API might solve this problem?