Come learn all about what token authentication is and how to use it in your Node + Express apps.
verifyAccessToken takes two arguments ( I’m guessing this is a change since the article was written) so you need to call it as
oktaJwtVerifier.verifyAccessToken(req.token, "api://default") to get this example to work
If you use the 0.0.14 version (like this tutorial does), you shouldn’t have this problem.
I am getting Error while resolving signing key for error while verify the okta token using oktaJwtVerifier
I upgraded this tutorial to use the latest Okta JWT Verifier. See this post’s changelog for specifics.
How to handle
Bearer token out of the app, suppose I copy the Bearer token, and log out of the main app, then I’ll use token to call the private API?