Anyone have work with `CognitoJwtVerifier` which i...
# random
Anyone have work with 
 which is coming from 
 ? I'm trying to verify my cognito JWT token manually. But when i use this i'm getting a syntax error.
SyntaxError: Unexpected token '.'
What am i missing here?
Copy code
import { CognitoJwtVerifier } from "aws-jwt-verify";

const verifier = CognitoJwtVerifier.create({
  userPoolId: "<user_pool_id>",
  tokenUse: "access", // scopes are only present on Cognito access tokens
  clientId: "<client_id>"

try {
  const payload = await verifier.verify("eyJraWQeyJhdF9oYXNoIjoidk...");
  console.log("Token is valid. Payload:", payload);
} catch {
  console.log("Token not valid!");
Where is the syntax error you're getting
I'm getting just this
SyntaxError: Unexpected token '.'
I think thing might have something to do with node version
Thanks for the links. I'll check those
Is that a runtime error? If so are you sure you're passing in the full jwt
Yeah it's a run time error. I Just removed and reinstalled my node modules. It's look working now. I think it was caused by the node version.