Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tsndr committed Oct 27, 2024
1 parent e57ccf7 commit cce5a61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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",
Expand All @@ -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)
Expand Down

0 comments on commit cce5a61

Please sign in to comment.