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()
5 Replies
@Ping @bekacru
Solution
Have you checked if the headers contain the cookies required?
yeah, this fixed the issue, but im a little confused. So i should pass cookies AND token to headers from expo?
tabiki
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