Repository navigation
fix(nextjs): evaluate auth.protect() authorization params for machine tokens - #10198
Conversation
🦋 Changeset detectedLatest commit: b4610b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The predicate overload return type moves to a follow-up change so this one only alters runtime behavior.
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
Description
auth.protect()returned as soon as a machine token was authenticated, so therole,permission,feature,plan, andreverificationparams and the predicate callback were never evaluated for API keys, OAuth tokens, or M2M tokens.Machine tokens now go through the same authorization step as session tokens. Their
has()always returnsfalse, so param-based checks respond with a 401. A predicate decides on its own result.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change