mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-20 09:47:21 +02:00
🐛 Fix check for missing token on initial render (#1054)
This commit is contained in:
parent
7ebaabe232
commit
8a69deee53
1 changed files with 2 additions and 2 deletions
|
@ -48,10 +48,10 @@ export const middleware = withAuth(
|
||||||
callbacks: {
|
callbacks: {
|
||||||
authorized: ({ token, req }) => {
|
authorized: ({ token, req }) => {
|
||||||
const nextUrl = req.nextUrl;
|
const nextUrl = req.nextUrl;
|
||||||
|
const isGuest = !token?.email;
|
||||||
if (
|
if (
|
||||||
isSelfHosted &&
|
isSelfHosted &&
|
||||||
token?.email === null &&
|
isGuest &&
|
||||||
!(
|
!(
|
||||||
nextUrl.pathname.startsWith("/invite") ||
|
nextUrl.pathname.startsWith("/invite") ||
|
||||||
nextUrl.pathname.startsWith("/login") ||
|
nextUrl.pathname.startsWith("/login") ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue