Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 16, 2025

Bumps @clerk/nextjs from 4.31.8 to 6.22.0.

Release notes

Sourced from @​clerk/nextjs's releases.

@​clerk/nextjs@​6.22.0

Minor Changes

  • Add <APIKeys /> component. This component will initially be in early access and not recommended for production usage just yet. (#5858) by @​wobsoriano

  • Respect acceptsToken when returning unauthenticated session or machine object. (#6112) by @​wobsoriano

Patch Changes

@​clerk/nextjs@​6.21.0

Minor Changes

  • Introduces machine authentication, supporting four token types: api_key, oauth_token, machine_token, and session_token. For backwards compatibility, session_token remains the default when no token type is specified. This enables machine-to-machine authentication and use cases such as API keys and OAuth integrations. Existing applications continue to work without modification. (#5689) by @​wobsoriano

    You can specify which token types are allowed for a given route or handler using the acceptsToken property in the auth() helper, or the token property in the auth.protect() helper. Each can be set to a specific type, an array of types, or 'any' to accept all supported tokens.

    Example usage in Nextjs middleware:

    import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
    const isOAuthAccessible = createRouteMatcher(['/oauth(.)']);
    const isApiKeyAccessible = createRouteMatcher(['/api(.)']);
    const isMachineTokenAccessible = createRouteMatcher(['/m2m(.)']);
    const isUserAccessible = createRouteMatcher(['/user(.)']);
    const isAccessibleToAnyValidToken = createRouteMatcher(['/any(.*)']);
    export default clerkMiddleware(async (auth, req) => {
    if (isOAuthAccessible(req)) await auth.protect({ token: 'oauth_token' });
    if (isApiKeyAccessible(req)) await auth.protect({ token: 'api_key' });
    if (isMachineTokenAccessible(req)) await auth.protect({ token: 'machine_token' });
    if (isUserAccessible(req)) await auth.protect({ token: 'session_token' });
    if (isAccessibleToAnyValidToken(req)) await auth.protect({ token: 'any' });
    });
    export const config = {
    matcher: [
    '/((?!_next|[^?]\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).)',
    '/(api|trpc)(.*)',

... (truncated)

Changelog

Sourced from @​clerk/nextjs's changelog.

6.22.0

Minor Changes

  • Add <APIKeys /> component. This component will initially be in early access and not recommended for production usage just yet. (#5858) by @​wobsoriano

  • Respect acceptsToken when returning unauthenticated session or machine object. (#6112) by @​wobsoriano

Patch Changes

6.21.0

Minor Changes

  • Introduces machine authentication, supporting four token types: api_key, oauth_token, machine_token, and session_token. For backwards compatibility, session_token remains the default when no token type is specified. This enables machine-to-machine authentication and use cases such as API keys and OAuth integrations. Existing applications continue to work without modification. (#5689) by @​wobsoriano

    You can specify which token types are allowed for a given route or handler using the acceptsToken property in the auth() helper, or the token property in the auth.protect() helper. Each can be set to a specific type, an array of types, or 'any' to accept all supported tokens.

    Example usage in Nextjs middleware:

    import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
    const isOAuthAccessible = createRouteMatcher(['/oauth(.)']);
    const isApiKeyAccessible = createRouteMatcher(['/api(.)']);
    const isMachineTokenAccessible = createRouteMatcher(['/m2m(.)']);
    const isUserAccessible = createRouteMatcher(['/user(.)']);
    const isAccessibleToAnyValidToken = createRouteMatcher(['/any(.*)']);
    export default clerkMiddleware(async (auth, req) => {
    if (isOAuthAccessible(req)) await auth.protect({ token: 'oauth_token' });
    if (isApiKeyAccessible(req)) await auth.protect({ token: 'api_key' });
    if (isMachineTokenAccessible(req)) await auth.protect({ token: 'machine_token' });
    if (isUserAccessible(req)) await auth.protect({ token: 'session_token' });
    if (isAccessibleToAnyValidToken(req)) await auth.protect({ token: 'any' });
    });
    export const config = {
    matcher: [

... (truncated)

Commits
  • 6e9bde8 ci(repo): Version packages (#6077)
  • d832d91 chore(backend,nextjs): Refactor unauthenticated auth object fallback to respe...
  • 18bcb64 feat(clerk-js,clerk-react,nextjs): Introduce \<APIKeys /> AIO component (#5858)
  • 4118ed7 chore(backend): Improve subject handling for machine auth objects (#6099)
  • 183e382 chore(backend): Add getAuth() type helper tests (#6079)
  • 2148166 feat(express,fastify,tanstack-react-start,react-router): Support machine auth...
  • 5f645bc ci(repo): Version packages (#6031)
  • 4f93634 chore(backend,nextjs,astro): Introduce getAuthObjectFromJwt as internal uti...
  • a5619ed chore(nextjs): Updated URL for auth cant detect usage of clerkMiddleware ...
  • ea622ba feat(backend,nextjs): Introduce machine authentication (#5689)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@clerk/nextjs](https://github.com/clerk/javascript/tree/HEAD/packages/nextjs) from 4.31.8 to 6.22.0.
- [Release notes](https://github.com/clerk/javascript/releases)
- [Changelog](https://github.com/clerk/javascript/blob/main/packages/nextjs/CHANGELOG.md)
- [Commits](https://github.com/clerk/javascript/commits/@clerk/nextjs@6.22.0/packages/nextjs)

---
updated-dependencies:
- dependency-name: "@clerk/nextjs"
  dependency-version: 6.22.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript labels Jun 16, 2025
@vercel
Copy link

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fork-commit-merge-web ❌ Failed (Inspect) Jun 16, 2025 7:34pm

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 16, 2025

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/clerk/nextjs-6.22.0 branch June 16, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants