Replies: 2 comments 1 reply
-
You need to create a https://supabase.io/docs/guides/auth#create-a-publicusers-table |
Beta Was this translation helpful? Give feedback.
1 reply
-
I've changed the code to this and it's working. The problem was when I call updateUser() there was no user to update. const { data, error } = await supabase
.from("users")
.select()
.match({ username });
if (data) {
if (data?.length < 1) {
const userAuth = await signUp();
if (userAuth.error) setError(userAuth.error.message);
else {
const userUpdated = await updateUser();
if (userUpdated.error) setError(userUpdated.error.message);
else {
setMessage(
"Successfully registered, please confirm your mail to proceed!"
);
}
}
} else {
setError("Username already taken");
}
}
if (error) {
setError(error?.message);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello so I've setup pretty basic next app with supabase, something like this: LINK
Now I need to add a custom column to the user table, something like this:
As you can see the custom column that I need to add is a username, now how can I do it?
Beta Was this translation helpful? Give feedback.
All reactions