Skip to content

getClaims allowExpired #1805

@mwstr

Description

@mwstr

Describe the bug

await getClaims(token, { allowExpired: true }

still throws expiration error

Library affected

auth-js

Reproduction

No response

Steps to reproduce

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 6800H with Radeon Graphics
    Memory: 3.63 GB / 15.19 GB
  Binaries:
    Node: 24.9.0 - C:\Users\Meowster\AppData\Local\mise\installs\node\24.9.0\node.EXE
    npm: 11.6.0 - C:\Users\Meowster\AppData\Local\mise\installs\node\24.9.0\npm.CMD
    pnpm: 10.17.1 - C:\Users\Meowster\AppData\Local\mise\installs\pnpm\10.17.1\pnpm.EXE
    bun: 1.3.1 - C:\Users\Meowster\.bun\bin\bun.EXE
    Deno: 1.39.0 - C:\Users\Meowster\.deno\bin\deno.EXE
  Browsers:
    Chrome: 141.0.7390.123
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @supabase/supabase-js: ^2.58.0 => 2.75.0

Used Package Manager

bun

Logs

71 | // The session_id inside the JWT does not correspond to a row in the
72 | // sessions table. This usually means the user has signed out, has been
73 | // deleted, or their session has somehow been terminated.
74 | throw new errors_1.AuthSessionMissingError();
75 | }
76 | throw new errors_1.AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
^
AuthApiError: invalid JWT: unable to parse or verify signature, token has invalid claims: token is expired
__isAuthError: true,
status: 403,
code: "bad_jwt"

  at handleError (C:\Users\Meowster\<redacted>\node_modules\.bun\@supabase+auth-js@2.75.0\node_modules\@supabase\auth-js\dist\main\lib\fetch.js:76:11)

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-jsRelated to the auth-js library.bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions