[GH-ISSUE #1506] Can one manually call getSession on backend without using Bearer Tokens? #26118

Closed
opened 2026-04-17 16:33:39 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @hexwanderer on GitHub (Feb 19, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1506

I want to wrap some APIs with a call to getSession on the backend. If I would like to do so without enabling the Bearer Tokens plugin, is it possible to do so? And if so, what info does the client need to be pass in the header, and in what format?

Originally created by @hexwanderer on GitHub (Feb 19, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1506 I want to wrap some APIs with a call to getSession on the backend. If I would like to do so without enabling the Bearer Tokens plugin, is it possible to do so? And if so, what info does the client need to be pass in the header, and in what format?
GiteaMirror added the locked label 2026-04-17 16:33:39 -05:00
Author
Owner

@Bekacru commented on GitHub (Feb 20, 2025):

You can use cookies and pass headers to the getSession call.

<!-- gh-comment-id:2670588865 --> @Bekacru commented on GitHub (Feb 20, 2025): You can use cookies and pass headers to the `getSession` call.
Author
Owner

@Rakhsan commented on GitHub (Feb 20, 2025):

just pass the headers but I think using the auth.api also works

<!-- gh-comment-id:2671259855 --> @Rakhsan commented on GitHub (Feb 20, 2025): just pass the headers but I think using the auth.api also works
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#26118