Skip to content

chore(backend): Add M2M token list method#7947

Open
wobsoriano wants to merge 4 commits intomainfrom
rob/m2m-list-method-core-3
Open

chore(backend): Add M2M token list method#7947
wobsoriano wants to merge 4 commits intomainfrom
rob/m2m-list-method-core-3

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Feb 26, 2026

Description

Cherry picked from #7939

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Added M2M token listing with pagination and filters for subject, revoked, and expired status.
  • Tests

    • Expanded test coverage for listing, pagination, authorization handling, filtering, and request validation.
  • Documentation

    • Added changelog entry and updated response handling so listing results return consistent paginated payloads.

@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2026

🦋 Changeset detected

Latest commit: b896f16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@clerk/backend Minor
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 27, 2026 3:55am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 24fd52f and b896f16.

📒 Files selected for processing (1)
  • .changeset/violet-bulldogs-attend.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/violet-bulldogs-attend.md

📝 Walkthrough

Walkthrough

Adds a paginated listing endpoint for M2M tokens: a new list(queryParams: GetM2MTokenListParams) method was added to M2MTokenApi (supports subject, revoked, expired, limit, offset). Deserializer gained handling for M2M token list responses, normalizing m2m_tokens and total_count into PaginatedResourceResponse. Tests were updated and expanded: mock M2M token fixtures include additional metadata fields and longer masked values, and a new test suite covers listing, authorization header handling, filters, and pagination. No existing API methods or public signatures were removed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new M2M token list method to the backend API, which is the primary focus across all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 26, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7947

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7947

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7947

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7947

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7947

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7947

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7947

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7947

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7947

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7947

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@7947

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7947

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7947

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7947

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7947

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7947

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7947

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7947

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7947

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7947

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7947

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7947

commit: b896f16

@@ -0,0 +1,2 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want an actual changeset/version bump for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oof, thought we want to keep the one in core 2 and not in core 3. Reverting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants