Astro
04/03/2022, 9:41 PMconst {userId} = useSessionContext();
would return DEFAULT_USER_ID
?rp
04/04/2022, 4:06 AMAstro
04/04/2022, 5:44 AMAstro
04/04/2022, 6:03 AMrp
04/04/2022, 6:04 AMAstro
04/04/2022, 6:04 AMrp
04/04/2022, 6:06 AMAstro
04/04/2022, 8:01 AMhtml
<Route path="/" element={
<ThirdPartyEmailPasswordAuth>
<Context.Provider value={{
todos: todos ?? []
}}>
<Header />
<TodoList />
</Context.Provider>
</ThirdPartyEmailPasswordAuth>
} />
rp
04/04/2022, 8:04 AMThirdPartyEmailPassword
recipe.Astro
04/04/2022, 8:04 AMrp
04/04/2022, 8:04 AMAstro
04/04/2022, 8:04 AMrp
04/04/2022, 8:05 AMuseSessionContext
?TodoList
?Astro
04/04/2022, 8:05 AMrp
04/04/2022, 8:07 AMimport {SessionAuth} from "supertokens-auth-react/recipe/session"
<SessionAuth requireAuth={false}>
<App />
</SessionAuth>
And this way, the useSessionContext
can be used anywhere in your appAstro
04/04/2022, 8:07 AMrp
04/04/2022, 8:07 AMAstro
04/04/2022, 8:07 AM