From cce5a617777c20b87f6cfeedb200ebe1867a29be Mon Sep 17 00:00:00 2001 From: Toby Date: Sun, 27 Oct 2024 13:38:23 +0100 Subject: [PATCH] update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ab64d27..6e7129c 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,14 @@ async () => { import jwt from "@tsndr/cloudflare-worker-jwt" // Create a token - const token = await sign({ + const token = await jwt.sign({ sub: "1234", name: "John Doe", email: "john.doe@gmail.com" }, "secret") // Verify token - const verifiedToken = await verify(token, "secret") + const verifiedToken = await jwt.verify(token, "secret") // Abort if token isn't valid if (!verifiedToken) @@ -56,7 +56,7 @@ async () => { import jwt from "@tsndr/cloudflare-worker-jwt" // Create a token - const token = await sign({ + const token = await jwt.sign({ sub: "1234", name: "John Doe", email: "john.doe@gmail.com", @@ -65,7 +65,7 @@ async () => { }, "secret") // Verify token - const verifiedToken = await verify(token, "secret") + const verifiedToken = await jwt.verify(token, "secret") // Abort if token isn't valid if (!verifiedToken)