Skip to content

Conversation

@Jibaru
Copy link

@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:

  • last_sign_in_at_after: Returns users where last_sign_in_at > value
  • last_sign_in_at_before: 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. Users can now filter user lists by last sign-in time using last_sign_in_at_after and last_sign_in_at_before parameters. These filters apply to both list and count endpoints.

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

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:
- last_sign_in_at_after: Returns users where last_sign_in_at > value
- last_sign_in_at_before: 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.
@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 29, 2026 9:25pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 1c2c078

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 new optional query parameters to the Users API list and count endpoints: last_sign_in_at_after and last_sign_in_at_before. These parameters enable range-based filtering of users by their last sign-in timestamp. The backend package receives a minor version bump, the type definitions are updated to include the new filter parameters, and test coverage is added to verify the parameters are correctly forwarded to the API requests.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding last_sign_in_at filters to the getUserList method.
Linked Issues check ✅ Passed The PR successfully implements the core requirement from USER-130 by adding last_sign_in_at filtering parameters to the getUserList endpoint.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the last_sign_in_at filters: type definition updates, tests, and changelog documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


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.

| 'last_sign_in_at'
>;
last_active_at_since?: number;
last_sign_in_at_after?: number;
Copy link
Member

Choose a reason for hiding this comment

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

🙃 I believe that, despite last_active_at_since, that these should be in camelCase.

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