Created
March 21, 2025 17:52
-
-
Save davidparys/105ca148590345e06853831cc901bdc6 to your computer and use it in GitHub Desktop.
Supabase Nuxt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
const deleteAccount = async () => { | |
try { | |
const data = await $fetch<{ success: boolean; message: string }>( | |
"/api/user/delete", | |
{ | |
method: "DELETE", | |
} | |
); | |
await useSupabaseClient().auth.signOut(); | |
} catch (error) { | |
console.error("Failed to delete account", error) | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment