[BUG] Type error with CognitoJwtVerifier.create
etroynov opened this issue · 2 comments
etroynov commented
ottokruse commented
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);
ottokruse commented