[GH-ISSUE #1039] Expose updatedAt in listAccounts endpoint #25886

Closed
opened 2026-04-17 16:12:02 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Pagebakers on GitHub (Dec 27, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1039

Is this suited for github?

  • Yes, this is suited for github

I would like the listAccounts endpoint to return the updatedAt timestamp, so I can use this to show the user when their password has last been changed for example.

Describe the solution you'd like

Return the timestamps here: https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/api/routes/account.ts#L52

Describe alternatives you've considered

Alternative is to query this myself, but I would rather use the built in client.

Additional context

I'm happy to open a PR for this if it's approved.

Originally created by @Pagebakers on GitHub (Dec 27, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1039 ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I would like the listAccounts endpoint to return the updatedAt timestamp, so I can use this to show the user when their password has last been changed for example. ### Describe the solution you'd like Return the timestamps here: https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/api/routes/account.ts#L52 ### Describe alternatives you've considered Alternative is to query this myself, but I would rather use the built in client. ### Additional context I'm happy to open a PR for this if it's approved.
GiteaMirror added the locked label 2026-04-17 16:12:02 -05:00
Author
Owner

@Bekacru commented on GitHub (Dec 27, 2024):

Hey yeah we can add this. Feel free to open a PR!

<!-- gh-comment-id:2563669480 --> @Bekacru commented on GitHub (Dec 27, 2024): Hey yeah we can add this. Feel free to open a PR!
Author
Owner

@daveycodez commented on GitHub (Dec 28, 2024):

It would be great if we could also list the emails in listAccounts as well so in the settings page we can show users which accounts they have connected for each provider. I assume this would just be available in the access_token field which we could use Jose to decode. I'm working on a better-auth-ui package that comes with settings cards for managing providers, would like to show users what accounts they have connected for each provider

<!-- gh-comment-id:2564131483 --> @daveycodez commented on GitHub (Dec 28, 2024): It would be great if we could also list the emails in listAccounts as well so in the settings page we can show users which accounts they have connected for each provider. I assume this would just be available in the access_token field which we could use Jose to decode. I'm working on a better-auth-ui package that comes with settings cards for managing providers, would like to show users what accounts they have connected for each provider
Author
Owner

@Pagebakers commented on GitHub (Jan 2, 2025):

Awesome! appreciate the fast turn around.

<!-- gh-comment-id:2568418317 --> @Pagebakers commented on GitHub (Jan 2, 2025): Awesome! appreciate the fast turn around.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25886