[PR #7351] [MERGED] fix: should return dates for expiration fields #7252

Closed
opened 2026-03-13 13:29:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7351
Author: @ping-maxwell
Created: 1/14/2026
Status: Merged
Merged: 1/14/2026
Merged by: @himself65

Base: canaryHead: fix/get-access-token-should-return-dates


📝 Commits (6)

  • 3997663 fix(get-access-token): should return dates for expiration fields
  • 2028e48 Update packages/better-auth/src/api/routes/account.ts
  • 6d3a3d8 fix: only transform if it's string
  • 73ef16b Update account.ts
  • 040e4c0 chore: CI snapshot
  • 4b51b08 prefer const

📊 Changes

2 files changed (+18 additions, -18 deletions)

View changed files

📝 packages/better-auth/src/api/routes/account.ts (+18 -11)
📝 packages/better-auth/src/plugins/open-api/__snapshots__/open-api.test.ts.snap (+0 -7)

📄 Description

getAccesToken's return of accessTokenExpiresAt is a string, we should convert this to a date for users who use auth.api for conviniance.

Warning:

This could be a breaking change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7351 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 1/14/2026 **Status:** ✅ Merged **Merged:** 1/14/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/get-access-token-should-return-dates` --- ### 📝 Commits (6) - [`3997663`](https://github.com/better-auth/better-auth/commit/39976634c1bba7acc52f08db61192816a64669ed) fix(get-access-token): should return dates for expiration fields - [`2028e48`](https://github.com/better-auth/better-auth/commit/2028e48b304d1b505e47235a2974359dc9c23f39) Update packages/better-auth/src/api/routes/account.ts - [`6d3a3d8`](https://github.com/better-auth/better-auth/commit/6d3a3d824952d76ce556c1e89b5244021fa42921) fix: only transform if it's string - [`73ef16b`](https://github.com/better-auth/better-auth/commit/73ef16b2c912ae215065eb69b77f721fe053f4b6) Update account.ts - [`040e4c0`](https://github.com/better-auth/better-auth/commit/040e4c0f9dd5ad7b1ce1d89eaa01e6cc6be510f3) chore: CI snapshot - [`4b51b08`](https://github.com/better-auth/better-auth/commit/4b51b080dff7c9863e4a037e8b425d2b1019c778) prefer const ### 📊 Changes **2 files changed** (+18 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/account.ts` (+18 -11) 📝 `packages/better-auth/src/plugins/open-api/__snapshots__/open-api.test.ts.snap` (+0 -7) </details> ### 📄 Description `getAccesToken`'s return of `accessTokenExpiresAt` is a string, we should convert this to a date for users who use auth.api for conviniance. ## Warning: This could be a breaking change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:29:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7252