Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT plugin: Authentication is not available at the moment. #3456

Open
zneel opened this issue Nov 3, 2024 · 0 comments
Open

JWT plugin: Authentication is not available at the moment. #3456

zneel opened this issue Nov 3, 2024 · 0 comments

Comments

@zneel
Copy link

zneel commented Nov 3, 2024

Describe the bug

ERR 68 |                 console.log('decodedToken', decodedToken);
69 |                 // Fetch the signing key based on the key id.
70 |                 const signingKey = await getSigningKey(decodedToken?.header.kid);
71 |                 if (!signingKey) {
72 |                     logger.warn(`Signing key is not available for the key id: ${decodedToken?.header.kid}. Please make sure signing key providers are configured correctly.`);
73 |                     throw Error(`Authentication is not available at the moment.`);
                               ^
error: Authentication is not available at the moment.
      at /Users//workspace///node_modules/@graphql-yoga/plugin-jwt/esm/plugin.js:73:27
      at processTicksAndRejections (native:7:39)
createRemoteJwksSigningKeyProvider({
            jwksUri: config.jwks.uri, (can be any jwks i guess)
            cache: true,
            rateLimit: true,
            cacheMaxAge: 60 * 60 * 24 * 30, // 30 days
          }),

is there by any chance a fix with this version? (I'm using bun)
https://github.com/auth0/node-jwks-rsa/releases/tag/v3.1.0
auth0/node-jwks-rsa#374
Or a workaround?

Your Example Website or App

dev env

Steps to Reproduce the Bug or Issue

  1. Create a new yoga project using Bun
  2. Add jwt plugin
  3. Setup createRemoteJwksSigningKeyProvider
  4. Authentication is not available at the moment.

Expected behavior

Im pretty new to bun but i guess it should work

Screenshots or Videos

No response

Platform

  • OS: [macOS intel]
  • bun --version
    1.1.34
  • "@graphql-yoga/plugin-jwt": "^3.2.0",
  • "graphql": "^16.9.0",
  • "graphql-yoga": "^5.8.0",

Additional context

Let me know if the context isnt clear enough or if you need other repro steps...
Thanks for the great lib
No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant