Complete all user management with forms and DB

This commit is contained in:
ChatonDeAru
2024-09-15 01:48:41 +02:00
committed by ChatonDeAru (Romain)
parent 37b2238b84
commit 5fa1f24caf
22 changed files with 730 additions and 108 deletions

View File

@@ -0,0 +1,13 @@
export const useAuth = () => {
const user = useSupabaseUser()
const { auth } = useSupabaseClient()
auth.onAuthStateChange(async (event) => {
if (event === 'SIGNED_OUT')
navigateTo('/')
})
return {
user
}
}