Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tsndr/cloudflare-worker-jwt

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsndr/cloudflare-worker-jwt - npm Package Compare versions

Comparing version 2.4.6 to 2.4.7

test.d.ts

6

index.d.ts

@@ -24,2 +24,8 @@ /// <reference types="@cloudflare/workers-types" />

typ?: string;
/**
* Algorithm (default: `"HS256"`)
*
* @default "HS256"
*/
alg?: JwtAlgorithm;
} & T;

@@ -26,0 +32,0 @@ /**

7

index.js

@@ -123,3 +123,8 @@ // src/utils.ts

throw new Error("algorithm not found");
const { payload } = decode(token);
const { header, payload } = decode(token);
if (header?.alg !== options.algorithm) {
if (options.throwError)
throw new Error("ALG_MISMATCH");
return false;
}
try {

@@ -126,0 +131,0 @@ if (!payload)

2

package.json
{
"name": "@tsndr/cloudflare-worker-jwt",
"version": "2.4.6",
"version": "2.4.7",
"description": "A lightweight JWT implementation with ZERO dependencies for Cloudflare Worker",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc