debug: remove redirect if no token found

This commit is contained in:
Rotimi Best
2023-12-14 22:19:55 +03:00
parent 90f60fcfe7
commit 5f2037101b
+4 -4
View File
@@ -222,10 +222,10 @@
handleResize();
if (!isSupabaseTokenInLocalStorage() && !isPublicRoute($page.url?.pathname)) {
console.log('No auth token and is not a public route, redirect to login', path);
return goto('/login?redirect=/' + path);
}
// if (!isSupabaseTokenInLocalStorage() && !isPublicRoute($page.url?.pathname)) {
// console.log('No auth token and is not a public route, redirect to login', path);
// return goto('/login?redirect=/' + path);
// }
const { data: authListener } = supabase.auth.onAuthStateChange((event, session) => {
// Log key events