Closed etroynov closed 1 year ago
This is expected I think, because if you predefine the config object like you did, TypeScript types each member as string
but tokenUse
must be access
or id
, a mere string
won't do.
This should work:
const config = {
userPoolId: "xxxxxxxxxxx",
tokenUse: "access" as const, // changed
clientId: "xxxxxxxxxxxx"
}
const verifier = CognitoJwtVerifier.create(config);
When i try use configuration from var i got an error:
But when i do it directly:
everything is fine.
Versions
aws-jwt-verify
:4.0.0
;lambda@edge
typescript
:5.0.2