mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-09 14:11:51 +02:00
♻️ Update how guest session is handled
This commit is contained in:
parent
debf21f309
commit
b5c20533d2
2 changed files with 22 additions and 27 deletions
|
@ -71,11 +71,6 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
|
|||
token: legacyToken,
|
||||
redirect: false,
|
||||
});
|
||||
} else {
|
||||
// End: Legacy token migration
|
||||
signIn("guest", {
|
||||
redirect: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -62,6 +62,7 @@ export default withAuth(
|
|||
value: legacyToken.value,
|
||||
httpOnly: false,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Create new guest user
|
||||
const newUser = `user-${randomid()}`;
|
||||
|
@ -86,7 +87,6 @@ export default withAuth(
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue