Packages

@clerk/backend

3.29.0 · 14 Nov 2026MIT8.4M / weekRepositoryHomepagenpmAtom feed

Upgrading @clerk/backend From 3.16.13 to 3.31.4

32 releases in betweenevery note read

Other targets from 3.16.13Latest3.29.0
  1. 3.16.13yours
  2. 31 releases
  3. 3.31.4target
  4. 841 pre

Before you upgrade

Tick each one off as you go
  • Deprecated3.22.0

Release by release

  1. 3.31.4

    20 Nov 20263 fixes
    • Fixed

      Fix debug() returning empty values on the auth object you get back when a request's token type doesn't match acceptsToken. It now returns the same redacted debug data as the original auth object.

    • Fixed

      authenticateRequest() now logs a warning when acceptsToken is set to an invalid value. A future major version will throw an error instead.

    • Fixed

      Fix auth().debug() in route handlers not redacting its data for requests authenticated with an M2M token, OAuth token or API key. Debug data is now redacted the same way as for session tokens.

  2. 3.31.1 – 3.31.33 releases, nothing new or fixed in the notes

  3. 3.31.0

    18 Nov 20262 new · 1 fix
    • New

      Add transactional_email_blocked to the ClerkPolicy reasons of the email.suppressed webhook event type. Clerk sends this reason when a queued transactional email is suppressed because sending was blocked for the instance.

    • New

      Add an optional secondFactorVerification parameter ('fresh' | 'stale') to createSignInToken(), which lets a user with a second factor enabled complete the sign-in without being prompted for it. expiresInSeconds is now optional.

    • Fixed

      users.getUserList() no longer waits for the user count when the page it lists already shows the total: a page with fewer users than its limit, or no users at all. The count can be slow for a search over many users, and before this change getUserList() failed whenever the count did. Both requests are still sent together, so a page that fills its limit takes as long as before.

  4. 3.30.0

    17 Nov 20261 new
    • New

      Add an experimental clerkClient.oauthApplications.__experimental_exchangeToken() method for performing an OAuth 2.0 Token Exchange (RFC 8693) on behalf of an OAuth application. Pass your publishable key, the application's client ID and client secret, a user's OAuth access token, and the target resource to receive a new access token for that resource, for example to call a downstream API on a user's behalf. The request goes to your instance's token endpoint, derived from the publishable key (or from proxyUrl when set), so it does not require a secret key. A proxyUrl must be an absolute HTTPS URL without a query or fragment, including for loopback hosts. Token exchange requests do not follow redirects, so credentials and tokens are never forwarded to another endpoint; a redirect response throws an OAuthTokenExchangeError with code invalid_response.

  5. 3.29.0

    14 Nov 20264 new
    • New

      Fetch the Poppy JSON artifact with the Clerk-defined clerkClient.artifacts.getPoppyJson() method.

    • New

      Add support for Personal Agent Protocol signed-in browser sessions. Enable the Clerk-defined poppy: true option on clerkMiddleware() to publish Poppy and OAuth protected resource discovery on the application domain.

    • New

      Add sessions.updateSession() to change when a single session expires, and users.mergeUser() to merge one user into another. The user.merged webhook event is now part of UserWebhookEvent, with a payload typed as UserMergedJSON.

    • New

      Add selfServeSsoEnabled and selfServeDirectorySyncEnabled to the parameters accepted by updateOrganization().

  6. 3.28.0

    12 Nov 20262 new
    • New

      JWTs without a cat header are no longer accepted as session tokens: authenticateRequest() returns signed out (token-type-mismatch) and verifyToken() returns token-invalid. This includes OIDC id_tokens issued by Clerk. Tests that sign their own session tokens must add cat: 'cl_B7d4PD111AAA' to the header.

    • New

      Add startingAfter to users.getUserList() so applications can page through user lists with a cursor.

  7. 3.27.0

    5 Nov 20261 new
    • New

      Add DirectoryGroupWebhookEvent and DirectoryGroupMembershipWebhookEvent to WebhookEvent, so verifyWebhook() narrows the directoryGroup.created, directoryGroup.updated, directoryGroup.synced, directoryGroup.deleted, directoryGroupMembership.created and directoryGroupMembership.deleted events that Directory Sync sends. Their payload types are exported as DirectoryGroupWebhookEventJSON, DirectoryGroupMembershipWebhookEventJSON and DeletedDirectoryGroupMembershipWebhookEventJSON.

  8. 3.26.6nothing new or fixed in the note

30 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.