Closed
Description
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
Publishable key
Description
Steps to reproduce:
- Set up a Clerk instance
- Use
@clerk/backend
sdk (version2.1.0
, lastest) - Create an instance of
ClerkClient
using your secretKey - Use
clerk.sessions.getToken
method
Expected behavior:
Expect to be able to pass expiresInSeconds
(or similar) parameter, as described in the backend api reference
Actual behavior:
It is not possible to pass this parameter
For reference, here's the typescript type for the getToken
method
getToken(sessionId: string, template: string): Promise<Token>;
Environment
System:
OS: Linux 5.15 Linux Mint 21.2 (Victoria)
CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K
Memory: 11.51 GB / 31.11 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.14.0/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
pnpm: 8.10.2 - ~/.local/share/pnpm/pnpm
Browsers:
Chrome: 137.0.7151.103
npmPackages:
@types/node: 20.10.0 => 20.10.0
@typescript-eslint/eslint-plugin: 5.62.0 => 5.62.0
@typescript-eslint/parser: 5.62.0 => 5.62.0
eslint: 8.57.1 => 8.57.1
eslint-import-resolver-typescript: 4.3.1 => 4.3.1
koa-helmet: 8.0.1 => 8.0.1
typescript: 5.4.5 => 5.4.5