funkyj8157
Need an expert in supabase
HI all. I have a big issue where a user is being logged in with a different user credentials. I also posted it on github. But this doesnt bring me any further. Therefore i look for someone who can have a second look at my code. Against payment. To see if they can figure it out. Here is the github issue https://github.com/nuxt-modules/supabase/issues/481
5 replies
nuxt middleware auth refresh
Hi. How do you guys prevent the quick flash when you refresh the page where a supabase middleware check is on? Right now i first shortly get redirected to te login page and then back to the dashboard. I think this i because the check is with supabase client so not on the server. Is this a normal thing? the code i use == export default defineNuxtRouteMiddleware((to, _from) => {
const user = useSupabaseUser()
if (!user.value) {
return navigateTo('/login')
}
})
5 replies
Usecookie and isr cache conflict
usecookie cookie resets to default after isr cache is refreshed. So i have this code // Cookies
const cookieBannerDismissed = useCookie("cookieBannerDismissed", {
default: () => false,
maxAge: 60 * 60 * 24 * 30, // 30 days in seconds
path: "/", // Set the cookie for the root path
});
const statisticsCookie = useCookie("statisticsEnabled", {
default: () => true,
maxAge: 60 * 60 * 24 * 30, // 30 days in seconds
path: "/", // Set the cookie for the root path
});
and in nuxtconfig routeRules: {
"/": { isr: 1200 },
"/foodtrucks": { isr: 1200 },
"/foodtrucks/**": { isr: 1200 },
"/zo-werkt-het": { isr: 1200 },
"/over-ons": { isr: 1200 },
"/foodtruck-aanmelden": { isr: 1200 },
"/contact": { isr: 1200 },
}, so my issue is after 1200 seconds over the usecookie resets. So the banner is shown again. How to prevent this? I dont read anything in the docs
5 replies