test auth fix idk
This commit is contained in:
@@ -5,10 +5,14 @@ import { Flex, Loader } from "@mantine/core";
|
||||
|
||||
export const Route = createFileRoute("/_authed")({
|
||||
beforeLoad: ({ context }) => {
|
||||
console.log('_authed beforeLoad context:', context.auth);
|
||||
|
||||
if (!context.auth?.user) {
|
||||
console.log('_authed: No user in context, redirecting to login');
|
||||
throw redirect({ to: "/login" });
|
||||
}
|
||||
|
||||
console.log('_authed: User found, allowing access');
|
||||
return {
|
||||
auth: {
|
||||
...context.auth,
|
||||
|
||||
Reference in New Issue
Block a user