Horrible redirect kludge to fix login flow, tidy up and readme

This commit is contained in:
Michael Dausmann
2023-01-02 20:53:04 +11:00
parent 0dbc33a145
commit edd65f1301
5 changed files with 21 additions and 19 deletions

View File

@@ -1,7 +1,13 @@
<script setup lang="ts">
definePageMeta({
middleware: ['auth'],
});
definePageMeta({
middleware: ['auth'],
});
//horrible horrible kludge from https://github.com/nuxt-modules/supabase/issues/28#issuecomment-1353070523
const user = useSupabaseUser();
watchEffect(async () => {
if (user.value) await navigateTo("dashboard");
});
</script>
<template>
<div>