Cleaned up auth. Ensured everything is necessary

This commit is contained in:
2025-03-11 10:05:31 -05:00
parent 6c0a275ee0
commit 86d1df3558
6 changed files with 99 additions and 62 deletions

View File

@@ -58,24 +58,15 @@ const Auth = () => {
} = await supabase.auth.signUp({
email,
password,
options: {
data: {
full_name,
provider: 'email',
}
}
});
if (error) Alert.alert(error.message);
else if (!session) Alert.alert('Please check your inbox for email verification!');
else {
const { error: updateProfileError } = await supabase
.from('profiles')
.upsert({
id: session.user.id,
full_name,
email,
provider: 'email',
updated_at: new Date(),
});
if (updateProfileError) {
Alert.alert('Error updating profile:', updateProfileError.message);
console.error('Error updating profile:', updateProfileError.message);
}
}
setLoading(false);
};