Menu

A session reaches our app four different ways, and detectSessionInUrl is off so one function can own all of them
📰

A session reaches our app four different ways, and detectSessionInUrl is off so one function can own all of them

DEV Community: typescript·Daniel Pertu·about 17 hours ago
#aEbxrRwi
Reading 0:00
15s threshold

Munchable is two deployed things on two origins. The marketing site and everything with a URL worth indexing is a Next.js app at munchable.app: the conditions pages , the ingredient answers , the recipes , sign-in . The app itself is an Expo app, shipped to Android and also served on the web through react-native-web, at app.munchable.app.

Two origins means two session stores, which means somebody has to carry a sign-in across. There are four ways a session arrives in the Expo app, and exactly one function consumes all of them.

Why the stores cannot just be shared

The Next.js side keeps its session in cookies, read by a server client on every request. The Expo app keeps its own:

export const supabase = createClient ( supabaseUrl , supabaseAnonKey , { auth : { storage : Platform . OS === ' web ' ?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.