We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c46ecc9 + 329a817 commit ecdba8dCopy full SHA for ecdba8d
docs/plugins/jwt.md
@@ -38,7 +38,7 @@ const app = new Elysia()
38
})
39
)
40
.get('/sign/:name', async ({ jwt, params: { name }, cookie: { auth } }) => {
41
- const value = await jwt.sign(name)
+ const value = await jwt.sign({ name })
42
43
auth.set({
44
value,
@@ -72,7 +72,7 @@ const app = new Elysia()
72
73
74
.get('/sign/:name', ({ jwt, params: { name } }) => {
75
- return jwt.sign(name)
+ return jwt.sign({ name })
76
77
.get('/profile', async ({ jwt, error, headers: { authorization } }) => {
78
const profile = await jwt.verify(authorization)
0 commit comments