{
  "id": "task_libraries:jwt/javascript",
  "path": "/exapedia/javascript-jwt-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript JWT libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript JWT libraries create and verify JSON Web Tokens, the signed tokens that carry identity claims between services. A server checks each token's signature and claims, such as its issuer, audience, and expiry, before it trusts the payload. These libraries handle the login sessions, API authentication, and single sign-on in web apps and backend services."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript JWT libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#jose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F129"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsonwebtoken",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#passport-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aws-jwt-verify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fast-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fastify-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#express-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#jose",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F130"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "JWT signing",
            "Browser-native verification"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#jose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F129"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsonwebtoken",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#passport-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aws-jwt-verify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fast-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fastify-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#express-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "jose",
          "name": [
            {
              "t": "fact",
              "fact": "F129"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/panva/jose"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/jose"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/panva/jose/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/panva/jose/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F129"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/nextauthjs/next-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F143"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export async function encode<Payload = JWT>(params: JWTEncodeParams<Payload>) {\n  const { token = {}, secret, maxAge = DEFAULT_MAX_AGE, salt } = params\n  const secrets = Array.isArray(secret) ? secret : [secret]\n  const encryptionSecret = await getDerivedEncryptionKey(enc, secrets[0], salt)\n\n  const thumbprint = await calculateJwkThumbprint(\n    { kty: \"oct\", k: base64url.encode(encryptionSecret) },\n    `sha${encryptionSecret.byteLength << 3}` as Digest\n  )\n  // @ts-expect-error `jose` allows any object as payload.\n  return await new EncryptJWT(token)\n    .setProtectedHeader({ alg, enc, kid: thumbprint })\n    .setIssuedAt()\n    .setExpirationTime(now() + maxAge)\n    .setJti(crypto.randomUUID())\n    .encrypt(encryptionSecret)\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/nextauthjs/next-auth/blob/a1a16a5a7780488c7449feece410033f445d0b31/packages/core/src/jwt.ts#L57",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20application%20code%20using%20jose%20for%20token%20signing%2C%20signature%20verification%2C%20encryption%20and%20key%20selection&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F129"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { SignJWT, jwtVerify } from \"jose\";\nconst key = crypto.getRandomValues(new Uint8Array(32));\nconst token = await new SignJWT({ sub: \"user-1\" }).setProtectedHeader({ alg: \"HS256\" }).setExpirationTime(\"5m\").sign(key);\nconst { payload } = await jwtVerify(token, key, { algorithms: [\"HS256\"] });\nconsole.log(payload.sub);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/panva/jose/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "SignJWT.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F134"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jsonwebtoken",
          "name": [
            {
              "t": "fact",
              "fact": "F145"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/auth0/node-jsonwebtoken"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/jsonwebtoken"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/auth0/node-jsonwebtoken/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/auth0/node-jsonwebtoken/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/colibri-hq/colibri",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F159"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export function verifyToken(token: string) {\n  if (!token) {\n    throw new Error(\"Missing or invalid access token\");\n  }\n\n  const { payload } = jwt.verify(token, env.JWT_SECRET, { complete: true });\n\n  if (typeof payload === \"string\") {\n    throw new Error(\"Unexpected token payload\");\n  }\n\n  return payload as AccessTokenPayload;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/colibri-hq/colibri/blob/2a282d3e9d02a8c62e0681d160d8c9c17d0dabbe/apps/app/src/lib/server/auth.ts#L34",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F158"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20application%20code%20using%20jsonwebtoken%20for%20token%20signing%2C%20signature%20verification%2C%20encryption%20and%20key%20selection&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "const jwt = require(\"jsonwebtoken\");\nconst { randomBytes } = require(\"node:crypto\");\nconst key = randomBytes(32);\nconst token = jwt.sign({ sub: \"user-1\" }, key, { algorithm: \"HS256\", expiresIn: \"5m\" });\nconsole.log(jwt.verify(token, key, { algorithms: [\"HS256\"] }));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/auth0/node-jsonwebtoken/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F150"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "passport-jwt",
          "name": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/mikenicholson/passport-jwt"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/passport-jwt"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/mikenicholson/passport-jwt/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F245"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/mikenicholson/passport-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/hoppscotch/hoppscotch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "constructor(\n    private usersService: UserService,\n    private configService: ConfigService,\n  ) {\n    super({\n      jwtFromRequest: ExtractJwt.fromExtractors([\n        (request: Request) =>\n          pipe(\n            extractToken(request),\n            E.fold(\n              (error) => {\n                throw error;\n              },\n              (token) => {\n                return token;\n              },\n            ),\n          ),\n      ]),\n      secretOrKey: configService.get('INFRA.JWT_SECRET'),\n    });\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/hoppscotch/hoppscotch/blob/55908a76a1d0555c9bbb5d74244c14173df95b06/packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts#L91",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F176"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=passport-jwt%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const express = require(\"express\");\nconst passport = require(\"passport\");\nconst { Strategy, ExtractJwt } = require(\"passport-jwt\");\nconst secret = process.env.JWT_SECRET;\nif (!secret) throw new Error(\"Set JWT_SECRET to the issuer shared key\");\npassport.use(new Strategy({ jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), secretOrKey: secret, algorithms: [\"HS256\"] }, (claims, done) => done(null, claims)));\nconst app = express();\napp.use(passport.initialize());\napp.get(\"/me\", passport.authenticate(\"jwt\", { session: false }), (req, res) => res.json(req.user));\napp.listen(3000);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/mikenicholson/passport-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "aws-jwt-verify",
          "name": [
            {
              "t": "fact",
              "fact": "F179"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/awslabs/aws-jwt-verify"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/aws-jwt-verify"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/awslabs/aws-jwt-verify/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F250"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/awslabs/aws-jwt-verify/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/getclawe/clawe",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F195"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function verifyCognitoToken(\n  token: string,\n): Promise<VerifiedToken | null> {\n  try {\n    const payload = await getCognitoVerifier().verify(token);\n    if (!isVerifiedToken(payload)) return null;\n    return payload;\n  } catch {\n    return null;\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/getclawe/clawe/blob/3214feda034b8a4924b4fb11c17c5129f099658c/apps/web/src/lib/auth/verify-token.ts#L43",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=aws-jwt-verify%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { CognitoJwtVerifier } from \"aws-jwt-verify\";\nconst verifier = CognitoJwtVerifier.create({ userPoolId: \"us-east-1_EXAMPLE\", tokenUse: \"id\", clientId: \"YOUR_APP_CLIENT_ID\" });\nconst claims = await verifier.verify(\"YOUR_ID_TOKEN\");\nconsole.log(claims.sub);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/awslabs/aws-jwt-verify/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "fast-jwt",
          "name": [
            {
              "t": "fact",
              "fact": "F197"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/nearform/fast-jwt"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/fast-jwt"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/nearform/fast-jwt/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/nearform/fast-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/fastify/fastify-jwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "function getVerifier (options, globalOptions) {\n    const useGlobalOptions = globalOptions ?? options === verifierConfig.options\n    // Use global verifier if using global options with static key\n    if (useGlobalOptions && hasStaticPublicKey) return verifier\n    // Only cache verifier when using default options (except for key)\n    if (useGlobalOptions && options.key && typeof options.key === 'string') {\n      let verifier = validatorCache.get(options.key)\n      if (!verifier) {\n        verifier = createVerifier(options)\n        validatorCache.set(options.key, verifier)\n      }\n      return verifier\n    }\n    return createVerifier(options)\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/fastify/fastify-jwt/blob/fbf0f92b9c5319508c0f3dccedc00cee563d9ebf/index.js#L267",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20application%20code%20using%20fast-jwt%20for%20token%20signing%2C%20signature%20verification%2C%20encryption%20and%20key%20selection&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "const { createSigner, createVerifier } = require(\"fast-jwt\");\nconst { randomBytes } = require(\"node:crypto\");\nconst key = randomBytes(32);\nconst sign = createSigner({ key, algorithm: \"HS256\", expiresIn: \"5m\" });\nconst verify = createVerifier({ key, algorithms: [\"HS256\"] });\nconsole.log(verify(sign({ sub: \"user-1\" })));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/nearform/fast-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F202"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "fastify-jwt",
          "name": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/fastify/fastify-jwt"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@fastify/jwt"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/fastify/fastify-jwt/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F255"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/fastify/fastify-jwt/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/netless-io/flat-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async (request: FastifyRequest, reply: FastifyReply): Promise<void> => {\n            try {\n                await request.jwtVerify();\n            } catch (err) {\n                loggerServer.warn(\"jwt verify failed\", parseError(err));\n                await reply.send({\n                    status: Status.Failed,\n                    code: ErrorCode.JWTSignFailed,\n                });\n\n                return;\n            }\n\n            const userUUID = (request.user as { userUUID?: string } | undefined)?.userUUID;\n            if (userUUID) {\n                const banned = await RedisService.get(RedisKey.userBlacklist(userUUID));\n                if (banned !== null) {\n                    await reply.send({\n                        status: Status.Failed,\n                        code: ErrorCode.UserBlacklisted,\n                    });\n                    return;\n                }\n            }\n        }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/netless-io/flat-server/blob/e6fdf472e9a91aff6302d3e2c4b8bbad19bce854/src/plugins/fastify/authenticate.ts#L25",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F228"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40fastify/jwt%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Fastify from \"fastify\";\nimport jwt from \"@fastify/jwt\";\nimport { randomBytes } from \"node:crypto\";\nconst app = Fastify();\nawait app.register(jwt, { secret: randomBytes(32).toString(\"hex\") });\nconsole.log(app.jwt.sign({ sub: \"user-1\" }, { expiresIn: \"5m\" }));\nawait app.close();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/fastify/fastify-jwt/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "express-jwt",
          "name": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/auth0/express-jwt"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/express-jwt"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/auth0/express-jwt/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F260"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/auth0/express-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F231"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const express = require(\"express\");\nconst { expressjwt } = require(\"express-jwt\");\nconst secret = process.env.JWT_SECRET;\nif (!secret) throw new Error(\"Set JWT_SECRET to the issuer shared key\");\nconst app = express();\napp.get(\"/me\", expressjwt({ secret, algorithms: [\"HS256\"] }), (req, res) => res.json(req.auth));\napp.listen(3000);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/auth0/express-jwt/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=express-jwt%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F231"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "How do I decode a JWT in JavaScript?",
      "a": [
        {
          "t": "text",
          "text": "The decode function in "
        },
        {
          "t": "link",
          "href": "#jsonwebtoken",
          "label": [
            {
              "t": "text",
              "text": "jsonwebtoken"
            }
          ]
        },
        {
          "t": "text",
          "text": " returns a token's payload without checking its signature. Server code that trusts the payload calls verify instead."
        }
      ]
    },
    {
      "q": "What is a JWKS?",
      "a": [
        {
          "t": "text",
          "text": "A JWKS, or JSON Web Key Set, is a JSON document that publishes the public keys a token issuer signs with. "
        },
        {
          "t": "link",
          "href": "#jose",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " creates a remote resolver that fetches missing or stale key sets, and "
        },
        {
          "t": "link",
          "href": "#aws-jwt-verify",
          "label": [
            {
              "t": "text",
              "text": "AWS JWT Verify"
            }
          ]
        },
        {
          "t": "text",
          "text": " loads the key set from its jwksUri setting."
        }
      ]
    },
    {
      "q": "What is jsonwebtoken?",
      "a": [
        {
          "t": "link",
          "href": "#jsonwebtoken",
          "label": [
            {
              "t": "text",
              "text": "jsonwebtoken"
            }
          ]
        },
        {
          "t": "text",
          "text": " signs JWTs and verifies their signatures and configured claims in Node.js. It offers synchronous and callback forms of verify."
        }
      ]
    },
    {
      "q": "What is JWE encryption?",
      "a": [
        {
          "t": "text",
          "text": "JWE, or JSON Web Encryption, is the token format for encrypted payloads. "
        },
        {
          "t": "link",
          "href": "#jose",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " provides EncryptJWT and jwtDecrypt with claims validation."
        }
      ]
    },
    {
      "q": "jose vs jsonwebtoken: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#jose",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " signs, verifies, and encrypts tokens across web-compatible runtimes. "
        },
        {
          "t": "link",
          "href": "#jsonwebtoken",
          "label": [
            {
              "t": "text",
              "text": "jsonwebtoken"
            }
          ]
        },
        {
          "t": "text",
          "text": " signs and verifies tokens in Node.js."
        }
      ]
    },
    {
      "q": "Does jsonwebtoken add an expiration automatically?",
      "a": [
        {
          "t": "fact",
          "fact": "F120"
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, jose",
      "display": "jose",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, jose",
      "display": "856.3M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, jose",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, jose",
      "display": "6.2.17",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, jose",
      "display": "v6.2.17",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, jose",
      "display": "7.9K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Signs tokens, jose",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Verifies signatures, jose",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Checks expiry, jose",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Remote JWKS, jose",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, jose",
      "display": "npm install jose",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, jose",
      "display": "Signs, verifies, encrypts, and decrypts tokens across web-compatible JavaScript runtimes.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, jose",
      "display": "Supports encrypted token payloads",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, jose",
      "display": "Use EncryptJWT and jwtDecrypt for encrypted JWT workflows.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, jose",
      "display": "Loads remote verification key sets",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, jose",
      "display": "createRemoteJWKSet fetches and caches keys from an HTTP endpoint.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, jose",
      "display": "Algorithm availability varies by runtime",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, jose",
      "display": "Check the chosen algorithm against the target runtime.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, jose",
      "display": "CommonJS needs compatible Node support",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, jose",
      "display": "Use ESM or Node with require(esm) enabled.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, jose",
      "display": "import * as jose from 'jose'\n\nconst secret = new TextEncoder().encode(\n  'cc7e0d44fd473002f1c42167459001140ec6389b7353f8088f4d9a95f2f596f2',\n)\nconst alg = 'HS256'\n\nconst jwt = await new jose.SignJWT({ 'urn:example:claim': true })\n  .setProtectedHeader({ alg })\n  .setIssuedAt()\n  .setIssuer('urn:example:issuer')\n  .setAudience('urn:example:audience')\n  .setExpirationTime('2h')\n  .sign(secret)\n\nconsole.log(jwt)\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, jose",
      "display": "export async function encode<Payload = JWT>(params: JWTEncodeParams<Payload>) {\n  const { token = {}, secret, maxAge = DEFAULT_MAX_AGE, salt } = params\n  const secrets = Array.isArray(secret) ? secret : [secret]\n  const encryptionSecret = await getDerivedEncryptionKey(enc, secrets[0], salt)\n\n  const thumbprint = await calculateJwkThumbprint(\n    { kty: \"oct\", k: base64url.encode(encryptionSecret) },\n    `sha${encryptionSecret.byteLength << 3}` as Digest\n  )\n  // @ts-expect-error `jose` allows any object as payload.\n  return await new EncryptJWT(token)\n    .setProtectedHeader({ alg, enc, kid: thumbprint })\n    .setIssuedAt()\n    .setExpirationTime(now() + maxAge)\n    .setJti(crypto.randomUUID())\n    .encrypt(encryptionSecret)\n}\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, jose",
      "display": "jwt.ts · encode()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, jose",
      "display": "nextauthjs/next-auth",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, nextauthjs/next-auth",
      "display": "28.4K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, nextauthjs/next-auth",
      "display": "Jul 2026",
      "asOf": "2026-07-22"
    },
    "F27": {
      "label": "Library name, jsonwebtoken",
      "display": "jsonwebtoken",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, jsonwebtoken",
      "display": "309.6M",
      "asOf": "2026-11-15"
    },
    "F29": {
      "label": "License, jsonwebtoken",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, jsonwebtoken",
      "display": "9.0.3",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Undated package release, jsonwebtoken",
      "display": "v9.0.3",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Repository stars, jsonwebtoken",
      "display": "18.2K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Signs tokens, jsonwebtoken",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Verifies signatures, jsonwebtoken",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Checks expiry, jsonwebtoken",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Remote JWKS, jsonwebtoken",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, jsonwebtoken",
      "display": "npm install jsonwebtoken",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, jsonwebtoken",
      "display": "Signs JWTs and verifies signatures and configured token claims in Node.js.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, jsonwebtoken",
      "display": "Supports synchronous and callback verification",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, jsonwebtoken",
      "display": "Choose immediate results or callback-based verification.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, jsonwebtoken",
      "display": "Checks the intended token audience",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, jsonwebtoken",
      "display": "Set audience and issuer during verification.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, jsonwebtoken",
      "display": "Tokens need an explicit expiry",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, jsonwebtoken",
      "display": "Set expiresIn or exp when tokens must expire.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, jsonwebtoken",
      "display": "Decoding alone skips signature verification",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, jsonwebtoken",
      "display": "Use verify to validate an incoming token.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, jsonwebtoken",
      "display": "var jwt = require('jsonwebtoken');\nvar token = jwt.sign({ foo: 'bar' }, 'shhhhh');\n\n// verify a token symmetric - synchronous\nvar decoded = jwt.verify(token, 'shhhhh');\nconsole.log(decoded.foo) // bar\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, jsonwebtoken",
      "display": "export function verifyToken(token: string) {\n  if (!token) {\n    throw new Error(\"Missing or invalid access token\");\n  }\n\n  const { payload } = jwt.verify(token, env.JWT_SECRET, { complete: true });\n\n  if (typeof payload === \"string\") {\n    throw new Error(\"Unexpected token payload\");\n  }\n\n  return payload as AccessTokenPayload;\n}\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, jsonwebtoken",
      "display": "auth.ts · verifyToken()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, jsonwebtoken",
      "display": "colibri-hq/colibri",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, colibri-hq/colibri",
      "display": "270",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, colibri-hq/colibri",
      "display": "Oct 2026",
      "asOf": "2026-10-29"
    },
    "F53": {
      "label": "Library name, fast-jwt",
      "display": "fast-jwt",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, fast-jwt",
      "display": "7.1M",
      "asOf": "2026-11-15"
    },
    "F55": {
      "label": "License, fast-jwt",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, fast-jwt",
      "display": "6.3.7",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Undated package release, fast-jwt",
      "display": "v6.3.7",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Repository stars, fast-jwt",
      "display": "440",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Signs tokens, fast-jwt",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Verifies signatures, fast-jwt",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Checks expiry, fast-jwt",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Remote JWKS, fast-jwt",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, fast-jwt",
      "display": "npm install fast-jwt",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, fast-jwt",
      "display": "Builds reusable JWT signer, decoder, and verifier functions with optional verification caching.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, fast-jwt",
      "display": "Reuses configured verifier functions",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, fast-jwt",
      "display": "Create a verifier once and pass tokens to it.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, fast-jwt",
      "display": "Caches verified tokens optionally",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, fast-jwt",
      "display": "Enable cache to reuse prior verification results.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, fast-jwt",
      "display": "Allowed algorithms need explicit restriction",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, fast-jwt",
      "display": "Set algorithms to the expected signing algorithms.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations lead, fast-jwt",
      "display": "Required claims need explicit configuration",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations, fast-jwt",
      "display": "Set requiredClaims for fields every token must contain.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Quickstart, fast-jwt",
      "display": "const { createVerifier, createSigner, TOKEN_ERROR_CODES } = require('fast-jwt')\n\n// Example 1: Handling an expired token\nconst sign = createSigner({ key: 'secret', expiresIn: '1ms' }) // Token expires almost immediately\nconst verify = createVerifier({ key: 'secret' })\n\nconst expiredToken = sign({ foo: 'bar' })\n\n// Wait for a moment to ensure the token expires\nsetTimeout(() => {\n  try {\n    verify(expiredToken)\n  } catch (err) {\n    if (err.code === TOKEN_ERROR_CODES.expired) {\n      console.error('Token verification failed because the token has expired.')\n      // Handle expired token error (e.g., prompt user to re-authenticate)\n    } else {\n      console.error('An unexpected error occurred:', err.message)\n    }\n  }\n}, 100); // Wait 100ms, which is longer than the token's 1ms validity\n\n// Example 2: Handling an invalid signature (e.g., wrong secret)\nconst correctSigner = createSigner({ key: 'correct-secret' })\nconst verifierWithWrongKey = createVerifier({ key: 'wrong-secret' })\n\nconst tokenSignedWithCorrectKey = correctSigner({ data: 'payload' })\n\ntry {\n  verifierWithWrongKey(tokenSignedWithCorrectKey)\n} catch (err) {\n  if (err.code === TOKEN_ERROR_CODES.invalidSignature) {\n    console.error('Token verification failed due to an invalid signature. This might be due to a key mismatch.')\n    // Handle invalid signature error\n  } else {\n    console.error('An unexpected error occurred:', err.message)\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function, fast-jwt",
      "display": "function getVerifier (options, globalOptions) {\n    const useGlobalOptions = globalOptions ?? options === verifierConfig.options\n    // Use global verifier if using global options with static key\n    if (useGlobalOptions && hasStaticPublicKey) return verifier\n    // Only cache verifier when using default options (except for key)\n    if (useGlobalOptions && options.key && typeof options.key === 'string') {\n      let verifier = validatorCache.get(options.key)\n      if (!verifier) {\n        verifier = createVerifier(options)\n        validatorCache.set(options.key, verifier)\n      }\n      return verifier\n    }\n    return createVerifier(options)\n  }\n",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project function reference, fast-jwt",
      "display": "index.js · getVerifier()",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project repository, fast-jwt",
      "display": "fastify/fastify-jwt",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project stars, fastify/fastify-jwt",
      "display": "588",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project push date, fastify/fastify-jwt",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F79": {
      "label": "Library name, jwt-simple",
      "display": "jwt-simple",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Monthly downloads, jwt-simple",
      "display": "1.6M",
      "asOf": "2026-11-15"
    },
    "F81": {
      "label": "License, jwt-simple",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Package release, jwt-simple",
      "display": "0.6.1",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Undated package release, jwt-simple",
      "display": "v0.6.1",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Repository stars, jwt-simple",
      "display": "1.4K",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Signs tokens, jwt-simple",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Verifies signatures, jwt-simple",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Checks expiry, jwt-simple",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Install, jwt-simple",
      "display": "npm install jwt-simple",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "What it does, jwt-simple",
      "display": "Provides a small encode/decode API for existing Node.js JWT integrations.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, jwt-simple",
      "display": "Verifies signatures when decoding",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, jwt-simple",
      "display": "The default decode operation verifies the signature.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths lead, jwt-simple",
      "display": "Accepts an expected algorithm",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths, jwt-simple",
      "display": "Pass the expected algorithm directly to decode.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, jwt-simple",
      "display": "The project is unmaintained",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, jwt-simple",
      "display": "Migrate existing integrations to jose or jsonwebtoken.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations lead, jwt-simple",
      "display": "Supports a limited algorithm set",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations, jwt-simple",
      "display": "Choose another library for algorithms beyond HMAC and RS256.",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Quickstart, jwt-simple",
      "display": "let jwt = require('jwt-simple');\nlet payload = { foo: 'bar' };\nlet secret = 'xxx';\n\n// HS256 secrets are typically 128-bit random strings, for example hex-encoded:\n// let secret = Buffer.from('fe1a1915a379f3be5394b64d14794932', 'hex')\n\n// encode\nlet token = jwt.encode(payload, secret);\n\n// decode\nlet decoded = jwt.decode(token, secret);\nconsole.log(decoded); //=> { foo: 'bar' }\n",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need",
      "display": "Tokens across web-compatible runtimes",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Why choose jose",
      "display": "encrypted JWT support alongside signature verification",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need in introduction",
      "display": "tokens across web-compatible runtimes",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "When to consider fast-jwt",
      "display": "reusable Node verifier functions fit the application",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need",
      "display": "Node.js verification with callbacks",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose jsonwebtoken",
      "display": "synchronous and callback verification",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "node.js verification with callbacks",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "When to consider jose",
      "display": "encrypted JWTs are needed",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Reusable verification with caching",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose fast-jwt",
      "display": "configured verifier functions",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "reusable verification with caching",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider jose",
      "display": "remote key-set loading should be native",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Page introduction",
      "display": "JavaScript JWT libraries let application developers create and verify JSON Web Tokens.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Does decoding a JWT verify its signature?",
      "display": "jsonwebtoken.decode returns payload data without verifying the signature; use verify for incoming tokens.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Does decoding a JWT verify its signature?",
      "display": "jwt-simple uses different naming: decode verifies by default unless noVerify is enabled.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which library supports encrypted JWT payloads?",
      "display": "jose provides EncryptJWT and jwtDecrypt with claims validation.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which library loads remote JSON Web Key Sets?",
      "display": "jose creates a remote resolver that fetches missing or stale key sets.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Which library loads remote JSON Web Key Sets?",
      "display": "jsonwebtoken demonstrates the separate jwks-rsa package.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Which library loads remote JSON Web Key Sets?",
      "display": "fast-jwt uses the separate get-jwks integration.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Are numeric expiry durations measured in the same units?",
      "display": "jsonwebtoken expiresIn interprets a numeric value as seconds.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Are numeric expiry durations measured in the same units?",
      "display": "fast-jwt expiresIn interprets a numeric value as milliseconds.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does jsonwebtoken add an expiration automatically?",
      "display": "A token carries an expiry only when the code sets expiresIn or an exp claim.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Does fast-jwt restrict algorithms by default?",
      "display": "Its verifier accepts all algorithms by default; configure the algorithms option for the expected set.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does fast-jwt require every registered token claim?",
      "display": "Claims are not required by default; requiredClaims declares mandatory names.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can jose require audience and issuer values?",
      "display": "The audience option checks the expected aud value and requires that claim.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Can jose require audience and issuer values?",
      "display": "The issuer option checks the expected iss value and requires that claim.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does jose support the same algorithms in every runtime?",
      "display": "Algorithm availability depends on the runtime used.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Can fast-jwt reuse verification results?",
      "display": "Its optional verified-token cache is disabled by default.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Is jwt-simple recommended for a new integration?",
      "display": "The upstream project says it is no longer maintained and recommends migrating to jose or jsonwebtoken.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: What should an existing jwt-simple verifier configure?",
      "display": "The upstream warning says to pass the expected algorithm rather than rely on the token alg header.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "Library name, jose",
      "display": "jose",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Monthly downloads, jose",
      "display": "878.5M",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "License, jose",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Package release, jose",
      "display": "6.2.18",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Package release date, jose",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Install, jose",
      "display": "npm install jose@6.2.18",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Quickstart, jose",
      "display": "import { SignJWT, jwtVerify } from \"jose\";\nconst key = crypto.getRandomValues(new Uint8Array(32));\nconst token = await new SignJWT({ sub: \"user-1\" }).setProtectedHeader({ alg: \"HS256\" }).setExpirationTime(\"5m\").sign(key);\nconst { payload } = await jwtVerify(token, key, { algorithms: [\"HS256\"] });\nconsole.log(payload.sub);\n",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Repository stars, jose",
      "display": "7.9K",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "JWT signing, jose",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Browser-native verification, jose",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Verification and integration role, jose",
      "display": "Portable Web Crypto JWT signatures/claim verification and JWE encryption with JWK/JWKS helpers through modern ESM.",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Runtime, keys, and first call, jose",
      "display": "Supported ESM Node/Web Crypto or browser/bundler host with a secure crypto context. The random key exists only for this same-process sign/verify round trip; it is not a persistent issuer key store. Verification explicitly allows HS256 only and the token has a short expiration.",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project function, jose",
      "display": "export async function encode<Payload = JWT>(params: JWTEncodeParams<Payload>) {\n  const { token = {}, secret, maxAge = DEFAULT_MAX_AGE, salt } = params\n  const secrets = Array.isArray(secret) ? secret : [secret]\n  const encryptionSecret = await getDerivedEncryptionKey(enc, secrets[0], salt)\n\n  const thumbprint = await calculateJwkThumbprint(\n    { kty: \"oct\", k: base64url.encode(encryptionSecret) },\n    `sha${encryptionSecret.byteLength << 3}` as Digest\n  )\n  // @ts-expect-error `jose` allows any object as payload.\n  return await new EncryptJWT(token)\n    .setProtectedHeader({ alg, enc, kid: thumbprint })\n    .setIssuedAt()\n    .setExpirationTime(now() + maxAge)\n    .setJti(crypto.randomUUID())\n    .encrypt(encryptionSecret)\n}\n",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project source file, jose",
      "display": "packages/core/src/jwt.ts",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project full_name, jose",
      "display": "nextauthjs/next-auth",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project stargazers_count, jose",
      "display": "28.4K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Library name, jsonwebtoken",
      "display": "jsonwebtoken",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Monthly downloads, jsonwebtoken",
      "display": "317.9M",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "License, jsonwebtoken",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release, jsonwebtoken",
      "display": "9.0.3",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Package release date, jsonwebtoken",
      "display": "Dec 2025",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Install, jsonwebtoken",
      "display": "npm install jsonwebtoken@9.0.3",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Quickstart, jsonwebtoken",
      "display": "const jwt = require(\"jsonwebtoken\");\nconst { randomBytes } = require(\"node:crypto\");\nconst key = randomBytes(32);\nconst token = jwt.sign({ sub: \"user-1\" }, key, { algorithm: \"HS256\", expiresIn: \"5m\" });\nconsole.log(jwt.verify(token, key, { algorithms: [\"HS256\"] }));\n",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Repository stars, jsonwebtoken",
      "display": "18.2K",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "JWT signing, jsonwebtoken",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Browser-native verification, jsonwebtoken",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Verification and integration role, jsonwebtoken",
      "display": "Established Node sign/verify/decode API with algorithm/issuer/audience/expiry options; complete:true returns token metadata as well as payload.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Runtime, keys, and first call, jsonwebtoken",
      "display": "Supported Node.js CommonJS host, e.g. hello.cjs. A generated ephemeral key signs and verifies one local demonstration token. Reusing tokens across processes requires the actual issuer key configuration; nothing is generated or persisted by this research.",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Project function, jsonwebtoken",
      "display": "export function verifyToken(token: string) {\n  if (!token) {\n    throw new Error(\"Missing or invalid access token\");\n  }\n\n  const { payload } = jwt.verify(token, env.JWT_SECRET, { complete: true });\n\n  if (typeof payload === \"string\") {\n    throw new Error(\"Unexpected token payload\");\n  }\n\n  return payload as AccessTokenPayload;\n}\n",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project source file, jsonwebtoken",
      "display": "apps/app/src/lib/server/auth.ts",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project full_name, jsonwebtoken",
      "display": "colibri-hq/colibri",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project stargazers_count, jsonwebtoken",
      "display": "270",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Library name, passport-jwt",
      "display": "Passport JWT",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Monthly downloads, passport-jwt",
      "display": "21.8M",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "License, passport-jwt",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Package release, passport-jwt",
      "display": "4.0.1",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Package release date, passport-jwt",
      "display": "Dec 2022",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Install, passport-jwt",
      "display": "npm install passport-jwt@4.0.1 passport express",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Quickstart, passport-jwt",
      "display": "const express = require(\"express\");\nconst passport = require(\"passport\");\nconst { Strategy, ExtractJwt } = require(\"passport-jwt\");\nconst secret = process.env.JWT_SECRET;\nif (!secret) throw new Error(\"Set JWT_SECRET to the issuer shared key\");\npassport.use(new Strategy({ jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), secretOrKey: secret, algorithms: [\"HS256\"] }, (claims, done) => done(null, claims)));\nconst app = express();\napp.use(passport.initialize());\napp.get(\"/me\", passport.authenticate(\"jwt\", { session: false }), (req, res) => res.json(req.user));\napp.listen(3000);\n",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Official description, passport-jwt",
      "display": "Passport authentication using JSON Web Tokens",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Quickstart source file, passport-jwt",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Repository stars, passport-jwt",
      "display": "2.0K",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "JWT signing, passport-jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Browser-native verification, passport-jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Verification and integration role, passport-jwt",
      "display": "Passport authentication strategy with configurable token extraction and application-user callback; token issuance is a separate library.",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Runtime, keys, and first call, passport-jwt",
      "display": "Node.js CommonJS/Express host with Passport installed and JWT_SECRET matching the actual HS256 issuer. This minimal complete route needs an incoming signed bearer JWT to authenticate; it does not create tokens or look up an application user database. Port3000 must be available when a user runs it.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Project function, passport-jwt",
      "display": "constructor(\n    private usersService: UserService,\n    private configService: ConfigService,\n  ) {\n    super({\n      jwtFromRequest: ExtractJwt.fromExtractors([\n        (request: Request) =>\n          pipe(\n            extractToken(request),\n            E.fold(\n              (error) => {\n                throw error;\n              },\n              (token) => {\n                return token;\n              },\n            ),\n          ),\n      ]),\n      secretOrKey: configService.get('INFRA.JWT_SECRET'),\n    });\n  }\n",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Project source file, passport-jwt",
      "display": "packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Project full_name, passport-jwt",
      "display": "hoppscotch/hoppscotch",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Project stargazers_count, passport-jwt",
      "display": "80.8K",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Library name, aws-jwt-verify",
      "display": "AWS JWT Verify",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Monthly downloads, aws-jwt-verify",
      "display": "10.3M",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "License, aws-jwt-verify",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Package release, aws-jwt-verify",
      "display": "5.2.1",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Package release date, aws-jwt-verify",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Install, aws-jwt-verify",
      "display": "npm install aws-jwt-verify@5.2.1",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart, aws-jwt-verify",
      "display": "import { CognitoJwtVerifier } from \"aws-jwt-verify\";\nconst verifier = CognitoJwtVerifier.create({ userPoolId: \"us-east-1_EXAMPLE\", tokenUse: \"id\", clientId: \"YOUR_APP_CLIENT_ID\" });\nconst claims = await verifier.verify(\"YOUR_ID_TOKEN\");\nconsole.log(claims.sub);\n",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Official description, aws-jwt-verify",
      "display": "JS library for verifying JWTs signed by Amazon Cognito, and any OIDC-compatible IDP that signs JWTs with RS256, RS384, RS512, ES256, ES384, ES512, Ed25519 and Ed448",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Quickstart source file, aws-jwt-verify",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Repository stars, aws-jwt-verify",
      "display": "751",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "JWT signing, aws-jwt-verify",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Browser-native verification, aws-jwt-verify",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Verification and integration role, aws-jwt-verify",
      "display": "Focused verification of Cognito, ALB, and generic OIDC/JWT tokens with JWKS/claim policy; no token signing API.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Runtime, keys, and first call, aws-jwt-verify",
      "display": "Supported Node.js ESM/CommonJS-interoperable or browser bundler host. Replace pool/client/token with a real Cognito ID-token setup; verify checks the configured pool issuer, audience, token_use, signature, and time claims. Public JWKS must be reachable; no AWS account/token/network access occurred here.",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project function, aws-jwt-verify",
      "display": "async function verifyCognitoToken(\n  token: string,\n): Promise<VerifiedToken | null> {\n  try {\n    const payload = await getCognitoVerifier().verify(token);\n    if (!isVerifiedToken(payload)) return null;\n    return payload;\n  } catch {\n    return null;\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project source file, aws-jwt-verify",
      "display": "apps/web/src/lib/auth/verify-token.ts",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project full_name, aws-jwt-verify",
      "display": "getclawe/clawe",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Project stargazers_count, aws-jwt-verify",
      "display": "751",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Library name, fast-jwt",
      "display": "fast-jwt",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Monthly downloads, fast-jwt",
      "display": "7.3M",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "License, fast-jwt",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release, fast-jwt",
      "display": "6.3.7",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Package release date, fast-jwt",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Install, fast-jwt",
      "display": "npm install fast-jwt@6.3.7",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Quickstart, fast-jwt",
      "display": "const { createSigner, createVerifier } = require(\"fast-jwt\");\nconst { randomBytes } = require(\"node:crypto\");\nconst key = randomBytes(32);\nconst sign = createSigner({ key, algorithm: \"HS256\", expiresIn: \"5m\" });\nconst verify = createVerifier({ key, algorithms: [\"HS256\"] });\nconsole.log(verify(sign({ sub: \"user-1\" })));\n",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Repository stars, fast-jwt",
      "display": "440",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "JWT signing, fast-jwt",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Browser-native verification, fast-jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Verification and integration role, fast-jwt",
      "display": "Reusable Node signer/verifier factories and configurable verification cache/key handling; core API differs from the Fastify plugin.",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Runtime, keys, and first call, fast-jwt",
      "display": "Supported Node.js CommonJS host, e.g. hello.cjs. One ephemeral key and explicit algorithm/expiry create a local sign/verify round trip. Signer/verifier factories are reusable; no throughput comparison or benchmark is inferred from this example.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project function, fast-jwt",
      "display": "function getVerifier (options, globalOptions) {\n    const useGlobalOptions = globalOptions ?? options === verifierConfig.options\n    // Use global verifier if using global options with static key\n    if (useGlobalOptions && hasStaticPublicKey) return verifier\n    // Only cache verifier when using default options (except for key)\n    if (useGlobalOptions && options.key && typeof options.key === 'string') {\n      let verifier = validatorCache.get(options.key)\n      if (!verifier) {\n        verifier = createVerifier(options)\n        validatorCache.set(options.key, verifier)\n      }\n      return verifier\n    }\n    return createVerifier(options)\n  }\n",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project source file, fast-jwt",
      "display": "index.js",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Project full_name, fast-jwt",
      "display": "fastify/fastify-jwt",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project stargazers_count, fast-jwt",
      "display": "588",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Library name, @fastify/jwt",
      "display": "Fastify JWT",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Monthly downloads, @fastify/jwt",
      "display": "5.3M",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "License, @fastify/jwt",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Package release, @fastify/jwt",
      "display": "10.2.8",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Package release date, @fastify/jwt",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Install, @fastify/jwt",
      "display": "npm install @fastify/jwt@10.2.8 fastify@5",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Quickstart, @fastify/jwt",
      "display": "import Fastify from \"fastify\";\nimport jwt from \"@fastify/jwt\";\nimport { randomBytes } from \"node:crypto\";\nconst app = Fastify();\nawait app.register(jwt, { secret: randomBytes(32).toString(\"hex\") });\nconsole.log(app.jwt.sign({ sub: \"user-1\" }, { expiresIn: \"5m\" }));\nawait app.close();\n",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Official description, @fastify/jwt",
      "display": "JWT utils for Fastify",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Quickstart source file, @fastify/jwt",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Repository stars, @fastify/jwt",
      "display": "588",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "JWT signing, @fastify/jwt",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Browser-native verification, @fastify/jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Verification and integration role, @fastify/jwt",
      "display": "Fastify plugin installing sign/verify/decode utilities and request/reply JWT methods, with the Fastify host lifecycle required.",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Runtime, keys, and first call, @fastify/jwt",
      "display": "Compatible Node.js ESM host with Fastify5 for this plugin generation. Registration installs app.jwt; one basic sign call follows completed registration, with an ephemeral demonstration secret and explicit expiry. No listener or external server needs to start for this first call.",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Project function, @fastify/jwt",
      "display": "async (request: FastifyRequest, reply: FastifyReply): Promise<void> => {\n            try {\n                await request.jwtVerify();\n            } catch (err) {\n                loggerServer.warn(\"jwt verify failed\", parseError(err));\n                await reply.send({\n                    status: Status.Failed,\n                    code: ErrorCode.JWTSignFailed,\n                });\n\n                return;\n            }\n\n            const userUUID = (request.user as { userUUID?: string } | undefined)?.userUUID;\n            if (userUUID) {\n                const banned = await RedisService.get(RedisKey.userBlacklist(userUUID));\n                if (banned !== null) {\n                    await reply.send({\n                        status: Status.Failed,\n                        code: ErrorCode.UserBlacklisted,\n                    });\n                    return;\n                }\n            }\n        }\n",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Project source file, @fastify/jwt",
      "display": "src/plugins/fastify/authenticate.ts",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Project full_name, @fastify/jwt",
      "display": "netless-io/flat-server",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Project stargazers_count, @fastify/jwt",
      "display": "683",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Library name, express-jwt",
      "display": "express-jwt",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Monthly downloads, express-jwt",
      "display": "4.4M",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "License, express-jwt",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Package release, express-jwt",
      "display": "8.5.1",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Package release date, express-jwt",
      "display": "Dec 2024",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Install, express-jwt",
      "display": "npm install express-jwt@8.5.1 express",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Quickstart, express-jwt",
      "display": "const express = require(\"express\");\nconst { expressjwt } = require(\"express-jwt\");\nconst secret = process.env.JWT_SECRET;\nif (!secret) throw new Error(\"Set JWT_SECRET to the issuer shared key\");\nconst app = express();\napp.get(\"/me\", expressjwt({ secret, algorithms: [\"HS256\"] }), (req, res) => res.json(req.auth));\napp.listen(3000);\n",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Official description, express-jwt",
      "display": "connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Quickstart source file, express-jwt",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Repository stars, express-jwt",
      "display": "4.5K",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "JWT signing, express-jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Browser-native verification, express-jwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Verification and integration role, express-jwt",
      "display": "Express verification middleware with explicit algorithms, key resolver, issuer/audience policy, and customizable token extraction; no token issuance.",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Runtime, keys, and first call, express-jwt",
      "display": "Supported Node.js CommonJS/Express host. JWT_SECRET must match the HS256 token issuer, and an incoming bearer token triggers verification on /me. The middleware verifies existing tokens and populates req.auth; it is not a signer or browser authentication server. Port3000 is only used if a user runs the recipe.",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "What, passport-jwt",
      "display": "Authenticates endpoints through Passport with a JSON Web Token instead of a session.",
      "asOf": "2026-11-17"
    },
    "F246": {
      "label": "Strength lead, passport-jwt",
      "display": "Session-free REST endpoints",
      "asOf": "2026-11-17"
    },
    "F247": {
      "label": "Strength body, passport-jwt",
      "display": "Each request carries its own token rather than a server session.",
      "asOf": "2026-11-17"
    },
    "F248": {
      "label": "Watch out lead, passport-jwt",
      "display": "Token extraction is required",
      "asOf": "2026-11-17"
    },
    "F249": {
      "label": "Watch out body, passport-jwt",
      "display": "The jwtFromRequest option must name where each request carries its token.",
      "asOf": "2026-11-17"
    },
    "F250": {
      "label": "What, aws-jwt-verify",
      "display": "Verifies JWTs signed by Amazon Cognito, Application Load Balancer, or any OIDC-compatible identity provider.",
      "asOf": "2026-11-17"
    },
    "F251": {
      "label": "Strength lead, aws-jwt-verify",
      "display": "Runs in browsers too",
      "asOf": "2026-11-17"
    },
    "F252": {
      "label": "Strength body, aws-jwt-verify",
      "display": "The verifier works in web browsers as well as Node.js.",
      "asOf": "2026-11-17"
    },
    "F253": {
      "label": "Watch out lead, aws-jwt-verify",
      "display": "Verifies tokens only",
      "asOf": "2026-11-17"
    },
    "F254": {
      "label": "Watch out body, aws-jwt-verify",
      "display": "It checks tokens that an identity provider issued rather than signing new ones.",
      "asOf": "2026-11-17"
    },
    "F255": {
      "label": "What, fastify jwt",
      "display": "Adds sign, verify, and decode to a Fastify server, built on fast-jwt.",
      "asOf": "2026-11-17"
    },
    "F256": {
      "label": "Strength lead, fastify jwt",
      "display": "Request and reply helpers",
      "asOf": "2026-11-17"
    },
    "F257": {
      "label": "Strength body, fastify jwt",
      "display": "The plugin registers request.jwtVerify and reply.jwtSign for route handlers.",
      "asOf": "2026-11-17"
    },
    "F258": {
      "label": "Watch out lead, fastify jwt",
      "display": "Secret required at registration",
      "asOf": "2026-11-17"
    },
    "F259": {
      "label": "Watch out body, fastify jwt",
      "display": "Registering the plugin requires a secret option.",
      "asOf": "2026-11-17"
    },
    "F260": {
      "label": "What, express-jwt",
      "display": "Validates JWTs in Express middleware and places the decoded payload on the request.",
      "asOf": "2026-11-17"
    },
    "F261": {
      "label": "Strength lead, express-jwt",
      "display": "Reads the Authorization header",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "Strength body, express-jwt",
      "display": "Tokens come from the Authorization header unless a custom getter is set.",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Watch out lead, express-jwt",
      "display": "Algorithms must be listed",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Watch out body, express-jwt",
      "display": "The required algorithms option guards against downgrade attacks.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript JWT libraries jsonwebtoken jose fast-jwt jwt-simple code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
