graphql/yoga-server/docs/features/jwt #3094
Replies: 3 comments 5 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.
3 replies
-
@graphql-yoga/plugin-jwt, This plugin requires setting |
Beta Was this translation helpful? Give feedback.
1 reply
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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