Skip to content

Commit 62d3e0f

Browse files
authored
Merge pull request #18 from ViliamKopecky/patch-1
feat: support number values in JWT payload
2 parents 7003915 + 378be4f commit 62d3e0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ JWTOption<Name, Schema>) => {
130130
}
131131
}).decorate(name as Name extends string ? Name : 'jwt', {
132132
sign: (
133-
morePayload: UnwrapSchema<Schema, Record<string, string>> &
133+
morePayload: UnwrapSchema<Schema, Record<string, string | number>> &
134134
JWTPayloadSpec
135135
) => {
136136
let jwt = new SignJWT({
@@ -151,7 +151,7 @@ JWTOption<Name, Schema>) => {
151151
verify: async (
152152
jwt?: string
153153
): Promise<
154-
| (UnwrapSchema<Schema, Record<string, string>> & JWTPayloadSpec)
154+
| (UnwrapSchema<Schema, Record<string, string | number>> & JWTPayloadSpec)
155155
| false
156156
> => {
157157
if (!jwt) return false

0 commit comments

Comments
 (0)