[GH-ISSUE #7222] Offer helper functions to manually validate cookies #10763

Open
opened 2026-04-13 07:06:18 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @benjaminpreiss on GitHub (Jan 9, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7222

Originally assigned to: @himself65 on GitHub.

Is this suited for github?

  • Yes, this is suited for github

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

It would be great if we could export helper functions to manually validate session cookies with the better auth secret. These should expect specific parts of the better auth config (session and account config).

Describe alternatives you've considered

alternative would be to call the better-auth api, but depending on the server config, this might not work for edge environments (like in middleware)

Additional context

No response

Originally created by @benjaminpreiss on GitHub (Jan 9, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7222 Originally assigned to: @himself65 on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like It would be great if we could export helper functions to manually validate session cookies with the better auth secret. These should expect specific parts of the better auth config (session and account config). ### Describe alternatives you've considered alternative would be to call the better-auth api, but depending on the server config, this might not work for edge environments (like in middleware) ### Additional context _No response_
GiteaMirror added the core label 2026-04-13 07:06:18 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 9, 2026):

To address your request for helper functions to manually validate session cookies using the better auth secret, it's a great idea as it could enhance flexibility, especially in edge environments. While there currently isn't a dedicated feature for this, there are discussions and requests around similar functionality, such as providing cookie helpers in various integrations like SvelteKit and supporting cookie validation in middleware contexts.

The proposed solution to export functions that utilize specific parts of better auth's session and account config aligns well with the ongoing discourse around enhancing cookie handling in the framework.

Since this is an interesting and relevant feature request, I suggest tagging @better-auth-agent to increase visibility and potentially get more feedback from the team on its feasibility and implementation timeline.

Have you considered what specific functionalities you would like included in those helper functions?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3729316184 --> @better-auth-agent[bot] commented on GitHub (Jan 9, 2026): To address your request for helper functions to manually validate session cookies using the better auth secret, it's a great idea as it could enhance flexibility, especially in edge environments. While there currently isn't a dedicated feature for this, there are discussions and requests around similar functionality, such as providing cookie helpers in various integrations like SvelteKit and supporting cookie validation in middleware contexts. The proposed solution to export functions that utilize specific parts of better auth's session and account config aligns well with the ongoing discourse around enhancing cookie handling in the framework. Since this is an interesting and relevant feature request, I suggest tagging @better-auth-agent to increase visibility and potentially get more feedback from the team on its feasibility and implementation timeline. Have you considered what specific functionalities you would like included in those helper functions? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10763