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

[Bug?]: JWT cannot be used prior to not before date claim (nbf) #11876

Open
1 task
SleeveShirtholes opened this issue Jan 3, 2025 · 0 comments
Open
1 task
Labels
bug/needs-info More information is needed for reproduction

Comments

@SleeveShirtholes
Copy link

What's not working?

I added clerk authentication to my redwoodjs application and sometimes when trying to get data from the graphql endpoint I get the following error message:

api | 19:19:40 🚨 graphql-server Error building context. Error: Exception in getAuthenticationContext: JWT cannot be used prior to not before date claim (nbf). Not before date: Fri, 03 Jan 2025 02:20:02 GMT; Current date: Fri, 03 Jan 2025 02:19:40 GMT;
api | 19:19:40 🚨 Exception in getAuthenticationContext: JWT cannot be used prior to not before date claim (nbf). Not before date: Fri, 03 Jan 2025 02:20:02 GMT; Current date: Fri, 03 Jan 2025 02:19:40 GMT; 
api | 
api | 🚨 Error Info
api | 
api | {}
api |  
api | 🥞 Error Stack
api | 
api | Error: Exception in getAuthenticationContext: JWT cannot be used prior to not before date claim (nbf). Not before date: Fri, 03 Jan 2025 02:20:02 GMT; Current date: Fri, 03 Jan 2025 02:19:40 GMT;
api |     at onContextBuilding (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/@redwoodjs/graphql-server/dist/plugins/useRedwoodAuthContext.js:37:15)
api |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
api |     at async Object.contextFactory (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/@envelop/core/cjs/orchestrator.js:206:45)
api |     at async processRequest (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/graphql-yoga/cjs/process-request.js:48:26)
api |     at async YogaServer.getResultForParams (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/graphql-yoga/cjs/server.js:286:26)
api |     at async handle (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/graphql-yoga/cjs/server.js:365:25)
api |     at async graphQLYogaHandler (/Users/steveschierholz/repos/budget-tracker-rw/node_modules/@redwoodjs/api-server/dist/bin.js:465:24)

How do we reproduce the bug?

Unsure because sometimes it will work sometimes and return the data and sometimes it returns this error and a 500 error.

What's your environment? (If it applies)

System:
    OS: macOS 15.1.1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - /private/var/folders/7c/3h3k1qgn1593v4lfv3xg_8lh0000gn/T/xfs-c4d49472/node
    Yarn: 4.4.0 - /private/var/folders/7c/3h3k1qgn1593v4lfv3xg_8lh0000gn/T/xfs-c4d49472/yarn
  Databases:
    SQLite: 3.43.2 - /usr/bin/sqlite3
  Browsers:
    Chrome: 131.0.6778.205
    Edge: 131.0.2903.112
    Safari: 18.1.1
  npmPackages:
    @redwoodjs/auth-clerk-setup: 8.4.2 => 8.4.2 
    @redwoodjs/cli-storybook-vite: 8.4.2 => 8.4.2 
    @redwoodjs/core: 8.4.2 => 8.4.2 
    @redwoodjs/project-config: 8.4.2 => 8.4.2 
    @redwoodjs/realtime: 8.4.2 => 8.4.2 
    @redwoodjs/studio: 12 => 12.0.0 
  redwood.toml:
    [web]
      title = "Redwood App"
      port = 8910
      apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
      includeEnvironmentVariables = [
        "CLERK_PUBLISHABLE_KEY",
      ]
    [api]
      port = 8911
    [browser]
      open = true
    [notifications]
      versionUpdates = ["latest"]

Are you interested in working on this?

  • I'm interested in working on this
@SleeveShirtholes SleeveShirtholes added the bug/needs-info More information is needed for reproduction label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction
Projects
None yet
Development

No branches or pull requests

1 participant