S
SolidJS15mo ago
Nathan

"Make sure your app is wrapped in a `<Router>`" with Lucia-Auth

I'm trying to move over to Lucia-Auth, and I'm following this guide. I have a routeData function that looks like this:
export const routeData = createServerData$(async (_, event) => {
const authRequest = auth.handleRequest(event.request)
const session = await authRequest.validate()
if (session) {
return redirect("/")
}
})
export const routeData = createServerData$(async (_, event) => {
const authRequest = auth.handleRequest(event.request)
const session = await authRequest.validate()
if (session) {
return redirect("/")
}
})
But it gives me a "Make sure your app is wrapped in a <Router>" error. My app has the usual <FileRoutes /> wrapped in a <Routes> tag, so I'm not sure what the problem is.
1 Reply
Nathan
NathanOP15mo ago
Oh, I just needed this to be routeData = () => createServerData$....
Want results from more Discord servers?
Add your server