Skip to content

schema: t.String() error #39

@K4leri

Description

@K4leri

изображение

export const jwtMessaging2 = new Elysia()
.use(
  jwt({
    name: "jwtMessaging",
    schema: t.String(),
    secret: "wkihfijbwnijoenfiwb euifbui23g89rg82g38r bdui293neruer 23u9br8ui923h8i",
    exp: '2h',
  })
);
export const messageEncrypt2 = (app: Elysia) =>
  app
    .use(jwtMessaging)
    .guard({response: t.String()})
    .onAfterHandle(async ({ jwtMessaging, response }) => {
        const payloadMessage = await jwtMessaging.sign(response);
        return payloadMessage;
    })

Hi! For some reason i cannt make schema that should be only as string. Its not correct or its a bug ?
@elysiajs/jwt": "^1.0.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions