The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Revert "vue3-ts-todo: make user sessions persistent upon refresh"
ykdojo8a0ee5781684
diff --git a/examples/vue3-ts-todo-list/src/App.vue b/examples/vue3-ts-todo-list/src/App.vueindex b458c0aceef..afa7fbacde5 100644--- a/examples/vue3-ts-todo-list/src/App.vue+++ b/examples/vue3-ts-todo-list/src/App.vue@@ -40,19 +40,6 @@ export default {Footer,},setup() {- // Get the auth token in the local storage.- const json = localStorage.getItem('supabase.auth.token')- if (json) {- const data = JSON.parse(json)- const { currentSession, expiresAt } = data- const timeNow = Math.round(Date.now() / 1000)- // If it hasn't expired yet, update userSession.- if (timeNow < expiresAt) {- userSession.value = currentSession- }- }- // NOTE: The pattern above is similar to that of the _recoverSession() function- // in supabase/gotrue-js: https://github.com/supabase/gotrue-js/blob/dc6cf10dcac016ba4831efdb9b8683bda109dab0/src/GoTrueClient.ts#L328return { userSession, handleLogout }},}diff --git a/examples/vue3-ts-todo-list/src/vuetils/useTodo.ts b/examples/vue3-ts-todo-list/src/vuetils/useTodo.tsindex 979b077659a..67f20acab7d 100644--- a/examples/vue3-ts-todo-list/src/vuetils/useTodo.ts+++ b/examples/vue3-ts-todo-list/src/vuetils/useTodo.ts@@ -9,10 +9,6 @@ const allTodos = ref<Todo[]>([])*/async function fetchTodos() {try {- // Wait for the supabase client to be fully initialized- // before making the following query. Without this line,- // this query would return an empty array.- await supabaseconst { data: todos, error } = await supabase.from('todos').select('*')