You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/auth-js/src/GoTrueClient.ts
+167Lines changed: 167 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -604,6 +604,173 @@ export default class GoTrueClient {
604
604
*
605
605
* @returns A logged-in session if the server has "autoconfirm" ON
606
606
* @returns A user if the server has "autoconfirm" OFF
607
+
*
608
+
* @category Auth
609
+
*
610
+
* @remarks
611
+
* - By default, the user needs to verify their email address before logging in. To turn this off, disable **Confirm email** in [your project](/dashboard/project/_/auth/providers).
612
+
* - **Confirm email** determines if users need to confirm their email address after signing up.
613
+
* - If **Confirm email** is enabled, a `user` is returned but `session` is null.
614
+
* - If **Confirm email** is disabled, both a `user` and a `session` are returned.
615
+
* - When the user confirms their email address, they are redirected to the [`SITE_URL`](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) by default. You can modify your `SITE_URL` or add additional redirect URLs in [your project](/dashboard/project/_/auth/url-configuration).
616
+
* - If signUp() is called for an existing confirmed user:
617
+
* - When both **Confirm email** and **Confirm phone** (even when phone provider is disabled) are enabled in [your project](/dashboard/project/_/auth/providers), an obfuscated/fake user object is returned.
618
+
* - When either **Confirm email** or **Confirm phone** (even when phone provider is disabled) is disabled, the error message, `User already registered` is returned.
619
+
* - To fetch the currently logged-in user, refer to [`getUser()`](/docs/reference/javascript/auth-getuser).
* @exampleDescription Sign up with a phone number and password (whatsapp)
730
+
* The user will be sent a WhatsApp message which contains a OTP. By default, a given user can only request a OTP once every 60 seconds. Note that a user will need to have a valid WhatsApp account that is linked to Twilio in order to use this feature.
731
+
*
732
+
* @example Sign up with a phone number and password (whatsapp)
0 commit comments