[GH-ISSUE #497] When i use auth.api.** on serverside inside nextjs api route it require headers can we use api functions without session? #8296

Closed
opened 2026-04-13 03:22:20 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @qasimali09 on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/497

Originally created by @qasimali09 on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/497
GiteaMirror added the locked label 2026-04-13 03:22:20 -05:00
Author
Owner

@firstaxel commented on GitHub (Nov 11, 2024):

You can't use the API without the session cause it is need to get the cookie and the active state of the user currently logged in.

<!-- gh-comment-id:2469194172 --> @firstaxel commented on GitHub (Nov 11, 2024): You can't use the API without the session cause it is need to get the cookie and the active state of the user currently logged in.
Author
Owner

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

be specific which function exactly you think shouldn't require headers. some actions may still need headers to check for a session, depending on the use case. If you think an action is incorrectly requiring headers, please open a new issue and describe it properly so we can take a closer look.

<!-- gh-comment-id:2548370463 --> @Bekacru commented on GitHub (Dec 17, 2024): be specific which function exactly you think shouldn't require headers. some actions may still need headers to check for a session, depending on the use case. If you think an action is incorrectly requiring headers, please open a new issue and describe it properly so we can take a closer look.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8296