春 | Haru
春 | Haru
NNuxt
Created by 春 | Haru on 8/15/2024 in #❓・help
css not applying on build mode
No description
13 replies
NNuxt
Created by 春 | Haru on 3/14/2023 in #❓・help
supabase error: Database error saving new user
idk if i can ask this here but, can someone tell me what i'm doing wrong? i'm trying to make a register page using supabase auth, but i always got the error on title. tried everything already but nothing seems to work D: here's my code:
definePageMeta({
middleware: 'unauthenticated',
})

const isErrorVisible = ref(false)
const errorMessage = ref('')
const successMessage = ref('')

const supaAuth = useSupabaseAuthClient().auth;

const credentials = reactive({
username: '',
email: '',
password: ''
})

const userRegister = async () => {
const { error } = await supaAuth.signUp({
email: credentials.email,
password: credentials.password,
options: {
data: {
username: credentials.username,
}
}
})

if (error) {
errorMessage.value = error.message;
isErrorVisible.value = true;
} else {
successMessage.value = 'check your email for confirmation.'
return navigateTo('/')
}
}
definePageMeta({
middleware: 'unauthenticated',
})

const isErrorVisible = ref(false)
const errorMessage = ref('')
const successMessage = ref('')

const supaAuth = useSupabaseAuthClient().auth;

const credentials = reactive({
username: '',
email: '',
password: ''
})

const userRegister = async () => {
const { error } = await supaAuth.signUp({
email: credentials.email,
password: credentials.password,
options: {
data: {
username: credentials.username,
}
}
})

if (error) {
errorMessage.value = error.message;
isErrorVisible.value = true;
} else {
successMessage.value = 'check your email for confirmation.'
return navigateTo('/')
}
}
thanks if someone can help me!
17 replies