Maintaining session in a webview.

I'm building an expo app with a nextjs companion app. There are some components that are not available in the react native world and I'm consuming them through a web view. The page that is consumed uses client and server side trpc calls to fetch data/ mutate. Is it possible for me to maintain the session from the expo side inside the nextjs page? On expo i have this

const cookies = authClient.getCookie();
const newSource = {
headers: { Cookie: cookies },
uri: `${getBaseUrl()}/flow/${today}`,
};

const cookies = authClient.getCookie();
const newSource = {
headers: { Cookie: cookies },
uri: `${getBaseUrl()}/flow/${today}`,
};
On the next js I'm consuming the cookie with
const session = await auth.api.getSession({
headers: headers(),
});
const session = await auth.api.getSession({
headers: headers(),
});
The initial data is fetched, but any client side calls failed with unauthorized issues. Am I trying to achieve something unachievable here?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?