[GH-ISSUE #1470] The setSignedCookie type and import causes not TS errors and appears to be a valid method but isn't valid. #26096

Closed
opened 2026-04-17 16:32:03 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @yacobmole on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1470

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Import setSignedCookie from better auth into a file
Try use it.

Current vs. Expected behavior

Should be a valid function as the type is there and should return void:

(alias) const setSignedCookie: (header: Headers, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<void>

import { setSignedCookie } from "better-auth";

vs.
Causes an error:
The export setSignedCookie was not found in module [project]/node_modules/better-auth/dist/api.js [app-route] (ecmascript) .
Did you mean to import getSession?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

What version of Better Auth are you using?

1.1.18

Provide environment information

OS - Windows 11, Bun
Browser - Edge 133.0.3065.69 (Official build) (64-bit)

Which area(s) are affected? (Select all that apply)

Types

Auth config (if applicable)


Additional context

No response

Originally created by @yacobmole on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1470 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Import setSignedCookie from better auth into a file Try use it. ### Current vs. Expected behavior Should be a valid function as the type is there and should return void: ```ts (alias) const setSignedCookie: (header: Headers, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<void> import { setSignedCookie } from "better-auth"; ``` vs. Causes an error: The export setSignedCookie was not found in module [project]/node_modules/better-auth/dist/api.js [app-route] (ecmascript) <exports>. Did you mean to import getSession? All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist. ### What version of Better Auth are you using? 1.1.18 ### Provide environment information ```bash OS - Windows 11, Bun Browser - Edge 133.0.3065.69 (Official build) (64-bit) ``` ### Which area(s) are affected? (Select all that apply) Types ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-17 16:32:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 12, 2025):

Hi, @yacobmole. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a problem with the setSignedCookie function in the "better-auth" package.
  • The function is expected to be available based on its type definition but results in an error stating the export is not found.
  • This issue occurs with version 1.1.18 of Better Auth on Windows 11 using the Edge browser.
  • The issue specifically affects the type definitions.
  • There are no comments or additional activity on the issue yet.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If there is no response, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:2967419398 --> @dosubot[bot] commented on GitHub (Jun 12, 2025): Hi, @yacobmole. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a problem with the `setSignedCookie` function in the "better-auth" package. - The function is expected to be available based on its type definition but results in an error stating the export is not found. - This issue occurs with version 1.1.18 of Better Auth on Windows 11 using the Edge browser. - The issue specifically affects the type definitions. - There are no comments or additional activity on the issue yet. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If there is no response, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#26096