graphql/yoga-server/docs/features/jwt #3094
Replies: 5 comments 7 replies
-
in context I can't see jwt what can I do? createYoga({
plugins: [
useJWT({
issuer: 'http://graphql-yoga.com',
signingKey,
}),
],
context: async (ctx) => {
console.log('jwt:', ctx.jwt); <-- Property 'jwt' does not exist in type 'YogaInitialContext'
}
}) |
Beta Was this translation helpful? Give feedback.
-
@graphql-yoga/plugin-jwt, This plugin requires setting |
Beta Was this translation helpful? Give feedback.
-
How can I set up various audiences? an authentication system based on the origin of the request site.test.com useJWT({
algorithms: ['HS256'],
audience: ['site.test.com','site2.test.com'],
issuer: 'api.test.com',
signingKey: 'test' ,
}), I would like the jwt to be valid based on the frontend domain |
Beta Was this translation helpful? Give feedback.
-
plugins doesn't work on cloudflare workers :( |
Beta Was this translation helpful? Give feedback.
-
Not sure if this has been pointed out, but the first property for
|
Beta Was this translation helpful? Give feedback.
-
graphql/yoga-server/docs/features/jwt
Learn how to add support for JWT authentication.
https://the-guild.dev/graphql/yoga-server/docs/features/jwt
Beta Was this translation helpful? Give feedback.
All reactions