Cleaned up auth. Ensured everything is necessary
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user