feat: middleware support for oauth

This commit is contained in:
swve 2024-06-03 14:48:28 +01:00
parent 52f2235942
commit 5ca1ba75e1
15 changed files with 212 additions and 43 deletions

View file

@ -10,16 +10,17 @@ function LHSessionProvider({ children }: { children: React.ReactNode }) {
useEffect(() => {
console.log('useLHSession', session);
}, [session])
}, [])
if (session.status == 'loading') {
if (session && session.status == 'loading') {
return <PageLoading />
}
else {
else if (session) {
return (
<SessionContext.Provider value={session}>
{console.log('rendered')}
{children}
</SessionContext.Provider>
)