Skip to content

Conversation

@Jibaru
Copy link
Contributor

@Jibaru Jibaru commented Jan 29, 2026

Description

Add support for filtering users by last sign-in timestamp ranges in the getUserList API method. This enables developers to query users based on when they last signed into their application.

The new parameters use exclusive comparison operators:

  • lastSignInAtAfter: Returns users where last_sign_in_at > value
  • lastSignInAtBefore: Returns users where last_sign_in_at < value

Both parameters accept Unix timestamps in milliseconds and can be used independently or combined to create date ranges. The filters are applied to both the /users and /users/count endpoints to ensure consistent pagination.

Checklist

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Added timestamp-based filtering for the Users API: filter user lists and counts by last sign-in time using last_sign_in_at_after and last_sign_in_at_before.
  • Tests

    • Added test coverage verifying the new last-sign-in filters apply to list and count endpoints.
  • Chores

    • Included a changeset indicating a minor version bump.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 29, 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 Jan 30, 2026 10:49pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: dbdfbbf

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

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

@Jibaru Jibaru marked this pull request as ready for review January 30, 2026 14:20
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

This pull request adds two optional query parameters to the Users API list and count endpoints: last_sign_in_at_after and last_sign_in_at_before. The backend package version is bumped, type definitions are updated to expose lastSignInAtAfter and lastSignInAtBefore on UserListParams, and a test is added to verify the new query parameters are forwarded to /v1/users and /v1/users/count.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main change: adding last_sign_in_at filters to the getUserList API, which is the core objective of this pull request.
Linked Issues check ✅ Passed The PR implements the requirement from USER-130 by adding last_sign_in_at_after and last_sign_in_at_before filters to getUserList, enabling filtering by last sign-in timestamp as requested.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the last_sign_in_at filters: a changeset file, test coverage for the new filters, and updates to UserListParams type definition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Add support for filtering users by last sign-in timestamp ranges in
the getUserList API method. This enables developers to query users
based on when they last signed into their application.

The new parameters use exclusive comparison operators:
- lastSignInAtAfter: Returns users where last_sign_in_at > value
- lastSignInAtBefore: Returns users where last_sign_in_at < value

Both parameters accept Unix timestamps in milliseconds and can be used
independently or combined to create date ranges. The filters are
applied to both the /users and /users/count endpoints to ensure
consistent pagination.
@Jibaru Jibaru force-pushed the irueda/user-130-get-users-endpoint-should-offer-last_signed_in_at-filter branch from 1c2c078 to dbdfbbf Compare January 30, 2026 22:48
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 30, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: dbdfbbf

@Jibaru Jibaru requested a review from tmilewski January 30, 2026 22:56
@Jibaru Jibaru merged commit ba1918d into main Jan 30, 2026
42 checks passed
@Jibaru Jibaru deleted the irueda/user-130-get-users-endpoint-should-offer-last_signed_in_at-filter branch January 30, 2026 23:34
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