auth.api.getSession doesn't reading Authorization header

Im using expo and nextjs monorepo setup, and expo successfully sending Bearer token in Authorization, and nextjs receives. But when i pass the headers to auth.api.getSession, it can't find session. I'm using 3 plugins: oAuthProxy(), expo(), nextCookies()
Solution:
Have you checked if the headers contain the cookies required?
Jump to solution
5 Replies
Emirhan Güneç
Emirhan GüneçOP22h ago
@Ping @bekacru
Solution
bekacru
bekacru22h ago
Have you checked if the headers contain the cookies required?
Emirhan Güneç
Emirhan GüneçOP21h ago
yeah, this fixed the issue, but im a little confused. So i should pass cookies AND token to headers from expo?
rhitune
rhitune21h ago
tabiki
Emirhan Güneç
Emirhan GüneçOP21h ago
https://github.com/Bekacru/create-t3-turbo/blob/main/apps/expo/src/utils/api.tsx i cloned this repo and merged with latest updates in original version, there is only token exists, i missed the cookies. Thanks
GitHub
create-t3-turbo/apps/expo/src/utils/api.tsx at main · Bekacru/crea...
Clean and simple starter repo using the T3 Stack along with Expo React Native - Bekacru/create-t3-turbo

Did you find this page helpful?