Improve documentation
The supabase.org documentation page for the SignUp method states:
Confirm email determines if users need to confirm their email address after signing up.
- If Confirm email is enabled, a user is returned but session is null.
- If Confirm email is disabled, both a user and a session are returned.
When the user confirms their email address, they are redirected to the [SITE_URL](https://supabase.com/docs/reference/auth/config#site_url) by default. You can modify your SITE_URL or add additional redirect URLs in [your project](https://supabase.com/dashboard/project/_/auth/url-configuration).
If SignUp() is called for an existing confirmed user:
- If Confirm email is enabled in [your project](https://supabase.com/dashboard/project/_/auth/providers), an obfuscated/fake user object is returned.
- If Confirm email is disabled, the error message, User already registered is returned.
Link
supabase.org page Create a new user
Describe the problem
The actual results of the SignUp method are different than described. It returns a Session object alone, and the behavior when attempting to sign up an existing user is not described accurately.
Describe the improvement
Update ethe documentation to reflect the actual return type and behavior of the method.
Additional context
In my experience, with confirm email enabled, when the method is used to sign up an existing user, it returns a Session object with an empty Identities list. If the user doesn't already exist and the sign up succeeds, it returns a Session object with a non-empty Identities list.
Improve documentation
The supabase.org documentation page for the SignUp method states:
Link
supabase.org page Create a new user
Describe the problem
The actual results of the SignUp method are different than described. It returns a
Sessionobject alone, and the behavior when attempting to sign up an existing user is not described accurately.Describe the improvement
Update ethe documentation to reflect the actual return type and behavior of the method.
Additional context
In my experience, with confirm email enabled, when the method is used to sign up an existing user, it returns a
Sessionobject with an emptyIdentitieslist. If the user doesn't already exist and the sign up succeeds, it returns aSessionobject with a non-emptyIdentitieslist.