Signup flow + switch to serverSupabaseUser in context (fixes token refresh issue)+ lib upgrades for nuxt/supabase and nuxt/trpc

This commit is contained in:
Michael Dausmann
2023-04-01 16:53:47 +11:00
parent f08f02851e
commit 5b2fe2f6c9
13 changed files with 604 additions and 407 deletions

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
const user = useSupabaseUser()
const supabase = useSupabaseAuthClient();
watchEffect(() => {
if (user.value) {
navigateTo('/dashboard', {replace: true})
@@ -10,6 +9,6 @@
<template>
<div>
<h3>Index</h3>
<button @click="supabase.auth.signInWithOAuth({provider: 'google'})">Connect with Google</button>
Nuxt 3 (SAAS) Boilerplate is very nice, why don't you <NuxtLink to="/signup">Get Started</NuxtLink>
</div>
</template>