Skip to content

fix better auth upgrade#861

Merged
elie222 merged 3 commits intomainfrom
chore/upgrade-better-auth
Oct 21, 2025
Merged

fix better auth upgrade#861
elie222 merged 3 commits intomainfrom
chore/upgrade-better-auth

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Oct 21, 2025

Summary by CodeRabbit

  • New Features

    • Added refresh token expiration tracking to improve authentication session management.
  • Bug Fixes

    • Improved handling of missing labels during removal operations, converting error conditions to informational messages for better reliability.
  • Chores

    • Version updated to v2.17.5.

@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
inbox-zero Ready Ready Preview Oct 21, 2025 9:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Warning

Rate limit exceeded

@elie222 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d89f93b and df3c781.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • apps/web/package.json (2 hunks)

Walkthrough

This PR extends the authentication system by adding refresh token expiration tracking to the Account model through a database migration and schema update, configures the new field in the auth settings, converts missing-label error logging to informational logging, and bumps the version to v2.17.5.

Changes

Cohort / File(s) Summary
Database Schema & Migrations
apps/web/prisma/migrations/20251021213524_better_auth_refresh_token_expires_at/migration.sql, apps/web/prisma/schema.prisma
Added refreshTokenExpiresAt field (DateTime, optional) to the Account model to track refresh token expiration. Includes corresponding database migration to add the TIMESTAMP(3) column.
Authentication Configuration
apps/web/utils/auth.ts
Added refreshTokenExpiresAt field mapping in the betterAuthConfig Account model configuration.
Label Handling
apps/web/utils/reply-tracker/label-helpers.ts
Changed missing-label handling from error-level logging to informational logging during label removal. Control flow unchanged; non-existent labels are now silently skipped without triggering errors.
Release
version.txt
Version bumped from v2.17.3 to v2.17.5.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Update migrations #638: Modifies the Account model and introduces Prisma migrations for schema changes, directly paralleling the account table schema extension.
  • Fix broken updates #860: Updates the same label-helpers.ts file to change missing-label behavior handling.
  • Reduce diff in schema #636: Restructures and reorders the Prisma Account model schema definition.

Poem

🐰 A token's expiry now tracked with care,
Fresh timestamps stored with database flair,
Missing labels logged soft, not with dread,
Version advances—v2.17.5, well-fed! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "fix better auth upgrade" is related to the primary changes in this pull request. The main modifications involve adding a refreshTokenExpiresAt field to the Account model across the database migration, Prisma schema, and auth configuration—all of which are directly part of a better auth library upgrade. The title specifically references "better auth upgrade," which accurately reflects this primary focus. While the title uses the term "fix" somewhat generically and doesn't specify the exact nature of the upgrade, it clearly identifies the real aspect of the changeset rather than being misleading or completely vague.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

@elie222 elie222 force-pushed the chore/upgrade-better-auth branch from 6e62fa3 to d89f93b Compare October 21, 2025 21:47
@socket-security
Copy link

socket-security bot commented Oct 21, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​better-auth/​sso@​1.3.7 ⏵ 1.3.2893 +1110073 +396 +1100

View full report

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 9 files

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 9 files

@elie222 elie222 merged commit 644ec49 into main Oct 21, 2025
16 checks passed
@elie222 elie222 deleted the chore/upgrade-better-auth branch October 21, 2025 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant