Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Fix check for missing token on initial render (#1054)
Luke Vella8a69deee534e
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.tsindex 9072ce163..63adc62c9 100644--- a/apps/web/src/middleware.ts+++ b/apps/web/src/middleware.ts@@ -48,10 +48,10 @@ export const middleware = withAuth(callbacks: {authorized: ({ token, req }) => {const nextUrl = req.nextUrl;-+ const isGuest = !token?.email;if (isSelfHosted &&- token?.email === null &&+ isGuest &&!(nextUrl.pathname.startsWith("/invite") ||nextUrl.pathname.startsWith("/login") ||