Skip to content

chore(backend,express): Introduce treatPendingAsSignedOut option to getAuth #5842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented May 5, 2025

Description

Allows passing treatPendingAsSignedOut to getAuth

// `pending` sessions will be treated as signed-out by default
const { userId } = getAuth(req)
// Both `active` and `pending` sessions will be treated as authenticated when `treatPendingAsSignedOut` is false
const { userId } = getAuth(req, { treatPendingAsSignedOut: false })

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:

Copy link

vercel bot commented May 5, 2025

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

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 3:51pm

@LauraBeatris LauraBeatris self-assigned this May 5, 2025
@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 080f453 to b81ca7e Compare May 5, 2025 20:01
Copy link

changeset-bot bot commented May 5, 2025

🦋 Changeset detected

Latest commit: b001f8a

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

This PR includes changesets to release 11 packages
Name Type
@clerk/backend Minor
@clerk/express Minor
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix 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

@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from b81ca7e to 3a2bd6c Compare May 5, 2025 20:32
@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 3a2bd6c to 4d7ae6b Compare May 5, 2025 21:57
@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 4d7ae6b to 4d75ad8 Compare May 5, 2025 22:04
@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 4d75ad8 to 17c8480 Compare May 5, 2025 22:08
@LauraBeatris LauraBeatris requested a review from a team May 5, 2025 22:10
@LauraBeatris LauraBeatris marked this pull request as ready for review May 5, 2025 22:12
Copy link
Member

@brkalow brkalow left a comment

Choose a reason for hiding this comment

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

👍

Copy link

pkg-pr-new bot commented May 15, 2025

Open in StackBlitz

@clerk/astro

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/agent-toolkit

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

@clerk/backend

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

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@5842

@clerk/chrome-extension

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/localizations

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@5842

@clerk/tanstack-react-start

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

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@5842

@clerk/shared

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

@clerk/testing

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

@clerk/types

npm i https://pkg.pr.new/@clerk/types@5842

@clerk/upgrade

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

@clerk/vue

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

commit: b001f8a

@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 3955265 to 8927fc7 Compare May 20, 2025 15:49
@LauraBeatris LauraBeatris force-pushed the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch from 8927fc7 to b001f8a Compare May 20, 2025 15:49
@LauraBeatris LauraBeatris merged commit ced8912 into main May 20, 2025
35 of 36 checks passed
@LauraBeatris LauraBeatris deleted the laura/orgs-621-sdk-introduce-treatpendingassignedout-option-across-sdk-3 branch May 20, 2025 16:02
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.

3 participants