Skip to content

chore(repo): Add machine auth tests for TanStack Start and React Router#8143

Open
wobsoriano wants to merge 2 commits intomainfrom
rob/machine-auth-e2e-tanstack
Open

chore(repo): Add machine auth tests for TanStack Start and React Router#8143
wobsoriano wants to merge 2 commits intomainfrom
rob/machine-auth-e2e-tanstack

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Mar 20, 2026

Description

Continuation of #8124

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

  • Tests
    • Added comprehensive integration test suites for machine authentication in TanStack React Start and React Router apps, covering API key, M2M (machine-to-machine), and OAuth flows.
    • Validates success and failure scenarios: missing/invalid tokens, token-type mismatches, scope/authorization behavior, JWT-formatted M2M tokens, dynamic scope changes, and end-to-end OAuth token verification.

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

⚠️ No Changeset found

Latest commit: 6dac8fd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Mar 20, 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 Mar 20, 2026 11:24pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 20, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6dac8fd

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7da79361-925f-436f-b6a8-58630684d988

📥 Commits

Reviewing files that changed from the base of the PR and between 04c698d and 6dac8fd.

📒 Files selected for processing (1)
  • integration/tests/react-router/machine.test.ts

📝 Walkthrough

Walkthrough

Two new Playwright integration test suites were added: one for @clerk/tanstack-react-start and one for React Router loaders. Both suites provision isolated app instances per test group, inject minimal API/route handlers (including API key, M2M, and OAuth verify/callback endpoints), configure environment variables, start dev servers, create test fixtures (fake users, API keys, OAuth apps, machine networks/tokens), and perform cleanup. Tests exercise API key, machine-to-machine (M2M), and OAuth authentication flows, including missing/invalid token handling, token type mismatch rejection, scope/access checks, and OAuth callback verification.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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 machine authentication tests for two frameworks (TanStack Start and React Router), which aligns with the 364 and 381 lines of new test code added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@wobsoriano wobsoriano changed the title chore(repo): Add machine auth tests for TanStack Start chore(repo): Add machine auth tests for TanStack Start and React Router Mar 20, 2026
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.

1 participant