BA
Better Auth•2mo ago
Henrik

Question on authorization

Hey, I have a stupid question. However, I can't figure it out at the moment. When I make an api call (from my api with hono). The following always returns null: const session = await auth.api.getSession({ headers: c.req.raw.headers }); Do I need to explicitly include auth details in the fetch call?
4 Replies
Ping
Ping•2mo ago
No this should had worked. Assuming your headers does have valid session info
Henrik
HenrikOP•2mo ago
This is weird @Ping is there any example out there?
Ping
Ping•2mo ago
I'm not sure of any Hono examples, sorry Might have to wait for someone else who has the info to help you here 😅
Henrik
HenrikOP•2mo ago
I mean in general? Where I have a fully seperate frontend from the backend. I mean it should be pretty irrelevant what backend I am using

Did you find this page helpful?