Packages

@clerk/astro

4.1.27 · 18 Nov 2026MIT46.5k / weekRepositoryHomepagenpmAtom feed

Your version

2.8.0

22 May 2025Where it was published

2.17.18 is the newest release of 2.x.

In short

1 new2 internal

Security

2 advisories affect 2.8.0; 2.17.11 fixes them

Release note

Minor Changes

  • Introduce treatPendingAsSignedOut option to getAuth and auth from clerkMiddleware

    By default, treatPendingAsSignedOut is set to true, which means pending sessions are treated as signed-out. You can set this option to false to treat pending sessions as authenticated.

    // `pending` sessions will be treated as signed-out by default
    const { userId } = getAuth(req, locals);
    // Both `active` and `pending` sessions will be treated as authenticated when `treatPendingAsSignedOut` is false
    const { userId } = getAuth(req, locals, { treatPendingAsSignedOut: false });
    clerkMiddleware((auth, context) => {
      const { redirectToSignIn, userId } = auth({ treatPendingAsSignedOut: false });
    
      // Both `active` and `pending` sessions will be treated as authenticated when `treatPendingAsSignedOut` is false
      if (!userId && isProtectedRoute(context.request)) {
        return redirectToSignIn();
      }
    });

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.