Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

adds redirects

Copplec5673dc4d939
diff --git a/apps/reference/_supabase_js/generated/auth-api-createuser.mdx b/apps/reference/_supabase_js/generated/auth-api-createuser.mdx
deleted file mode 100644
index 46c9ef301d4..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-createuser.mdx
+++ /dev/null
@@ -1,283 +0,0 @@
----
-id: auth-api-createuser
-title: 'createUser()'
-slug: /auth-api-createuser
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Creates a new user.
-This function should only be called on a server. Never expose your `service_role` key in the browser.
-
-```js
-const { data: user, error } = await supabase.auth.api.createUser({
- email: '[email protected]',
- password: 'password',
- user_metadata: { name: 'Yoda' },
-})
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- AdminUserAttributes
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- app_metadata
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for app_metadata that.
-
-Only a service role can modify.
-
-Can be any JSON that includes app-specific info, such as identity providers, roles, and other
-access control information.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- data
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for user_metadata that a user can modify. Can be any JSON.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's email.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email_change_token
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-An email change token.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email_confirm
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>boolean</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Sets if a user has confirmed their email address.
-
-Only a service role can modify.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- password
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's password.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- phone
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's phone.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- phone_confirm
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>boolean</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Sets if a user has confirmed their phone number.
-
-Only a service role can modify.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- user_metadata
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for user_metadata.
-
-Can be any JSON.
-
-Only a service role can modify.
-
-Note: When using the GoTrueAdminApi and wanting to modify a user's user_metadata,
-this attribute is used instead of UserAttributes data.
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should be called on a server. Never expose your `service_role` key in the browser.
-- If you do not provide the `email_confirm` and `phone_confirm` options to this function, both will default to false.
-
-## Examples
-
-### Create a new user.
-
-```js
-const { data: user, error } = await supabase.auth.api.createUser({
- email: '[email protected]',
- password: 'password',
- user_metadata: { name: 'Yoda' },
-})
-```
-
-### Auto-confirm email.
-
-```js
-const { data: user, error } = await supabase.auth.api.createUser({
- email: '[email protected]',
- email_confirm: true,
-})
-```
-
-### Auto-confirm phone.
-
-```js
-const { data: user, error } = await supabase.auth.api.createUser({
- phone: '1234567890',
- phone_confirm: true,
-})
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx b/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx
deleted file mode 100644
index d7e52882ef7..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx
+++ /dev/null
@@ -1,60 +0,0 @@
----
-id: auth-api-deleteuser
-title: 'deleteUser()'
-slug: /auth-api-deleteuser
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Delete a user. Requires a `service_role` key.
-
-```js
-const { data: user, error } = await supabase.auth.api.deleteUser(
- '715ed5db-f090-4b8c-a067-640ecee36aa0'
-)
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- uid
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user uid you want to remove.
-
-This function should only be called on a server. Never expose your `service_role` key in the browser.
-
- </div>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should be called on a server. Never expose your `service_role` key in the browser.
-
-## Examples
-
-### Remove a user completely.
-
-```js
-const { data: user, error } = await supabase.auth.api.deleteUser(
- '715ed5db-f090-4b8c-a067-640ecee36aa0'
-)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-generatelink.mdx b/apps/reference/_supabase_js/generated/auth-api-generatelink.mdx
deleted file mode 100644
index ddff873d518..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-generatelink.mdx
+++ /dev/null
@@ -1,162 +0,0 @@
----
-id: auth-api-generatelink
-title: 'generateLink()'
-slug: /auth-api-generatelink
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Generates links to be sent via email or other.
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- GenerateLinkType
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>signup</code> | <code>invite</code> | <code>magiclink</code> | <code>recovery</code> | <code>email_change_current</code> | <code>email_change_new</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The link type
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-</ul>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's email.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- options
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- data
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Optional user metadata. For signup only.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- password
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-User password. For signup only.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- redirectTo
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The redirect url which should be appended to the generated link
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should only be called on a server. Never expose your `service_role` key in the browser.
-
-## Examples
-
-### Generate invite link.
-
-```js
-const { data: user, error } = await supabase.auth.api.generateLink(
- 'invite',
-)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-getuser.mdx b/apps/reference/_supabase_js/generated/auth-api-getuser.mdx
deleted file mode 100644
index 7c958e35749..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-getuser.mdx
+++ /dev/null
@@ -1,59 +0,0 @@
----
-id: auth-api-getuser
-title: 'getUser()'
-slug: /auth-api-getuser
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Gets the current user details.
-
-This method is called by the GoTrueClient `update` where
-the jwt is set to this.currentSession.access_token
-and therefore, acts like getting the currently authenticated user
-
-```js
-const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- jwt
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A valid, logged-in JWT. Typically, the access_token for the currentSession
-
- </div>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Fetches the user object from the database instead of local storage.
-- Note that user() fetches the user object from local storage which might not be the most updated.
-- Requires the user's access_token.
-
-## Examples
-
-### Fetch the user object using the access_token jwt.
-
-```js
-const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-getuserbyid.mdx b/apps/reference/_supabase_js/generated/auth-api-getuserbyid.mdx
deleted file mode 100644
index 03422876696..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-getuserbyid.mdx
+++ /dev/null
@@ -1,57 +0,0 @@
----
-id: auth-api-getuserbyid
-title: 'getUserById()'
-slug: /auth-api-getuserbyid
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Get user by id.
-
-```js
-const { user, error } = await supabase.auth.api.getUserById(1)
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- uid
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's unique identifier
-
-This function should only be called on a server. Never expose your `service_role` key in the browser.
-
- </div>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Fetches the user object from the database instead of local storage.
-- Note that user() fetches the user object from local storage which might not be the most updated.
-- Requires the user's access_token.
-
-## Examples
-
-### Fetch the user object using the access_token jwt.
-
-```js
-const { user, error } = await supabase.auth.api.getUserById(1)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-inviteuserbyemail.mdx b/apps/reference/_supabase_js/generated/auth-api-inviteuserbyemail.mdx
deleted file mode 100644
index 0cd2d0c6951..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-inviteuserbyemail.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
----
-id: auth-api-inviteuserbyemail
-title: 'inviteUserByEmail()'
-slug: /auth-api-inviteuserbyemail
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Sends an invite link to an email address.
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The email address of the user.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- options
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- data
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Optional user metadata
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- redirectTo
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A URL or mobile address to send the user to after they are confirmed.
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should only be called on a server. Never expose your `service_role` key in the browser.
-
-## Examples
-
-### Basic example.
-
-```js
-const { data: user, error } = await supabase.auth.api.inviteUserByEmail(
-)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-listusers.mdx b/apps/reference/_supabase_js/generated/auth-api-listusers.mdx
deleted file mode 100644
index 8cb73a91217..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-listusers.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
----
-id: auth-api-listusers
-title: 'listUsers()'
-slug: /auth-api-listusers
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Get a list of users.
-
-This function should only be called on a server. Never expose your `service_role` key in the browser.
-
-```js
-const { data: user, error } = await supabase.auth.api.listUsers()
-```
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should be called on a server. Never expose your `service_role` key in the browser.
-
-## Examples
-
-### Get a full list of users.
-
-```js
-const { data: user, error } = await supabase.auth.api.listUsers()
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-resetpasswordforemail.mdx b/apps/reference/_supabase_js/generated/auth-api-resetpasswordforemail.mdx
deleted file mode 100644
index 79be4e6db18..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-resetpasswordforemail.mdx
+++ /dev/null
@@ -1,136 +0,0 @@
----
-id: auth-api-resetpasswordforemail
-title: 'resetPasswordForEmail()'
-slug: /auth-api-resetpasswordforemail
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Sends a reset request to an email address.
-
-```js
-const { data, error } = await supabase.auth.api.resetPasswordForEmail(
-)
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The email address of the user.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- options
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- captchaToken
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Verification token received when the user completes the captcha on the site.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- redirectTo
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A URL to send the user to after they are confirmed.
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-Sends a reset request to an email address.
-
-When the user clicks the reset link in the email they will be forwarded to:
-
-`<SITE_URL>#access_token=x&refresh_token=y&expires_in=z&token_type=bearer&type=recovery`
-
-Your app must detect `type=recovery` in the fragment and display a password reset form to the user.
-
-You should then use the access_token in the url and new password to update the user as follows:
-
-```js
-const { error, data } = await supabase.auth.api.updateUser(access_token, {
- password: new_password,
-})
-```
-
-## Examples
-
-### Reset password
-
-```js
-const { data, error } = await supabase.auth.api.resetPasswordForEmail(
-)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-api-updateuserbyid.mdx b/apps/reference/_supabase_js/generated/auth-api-updateuserbyid.mdx
deleted file mode 100644
index 2e55fc9ad9d..00000000000
--- a/apps/reference/_supabase_js/generated/auth-api-updateuserbyid.mdx
+++ /dev/null
@@ -1,326 +0,0 @@
----
-id: auth-api-updateuserbyid
-title: 'updateUserById()'
-slug: /auth-api-updateuserbyid
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Updates the user data.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { email: '[email protected]' }
-)
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- uid
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- AdminUserAttributes
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- app_metadata
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for app_metadata that.
-
-Only a service role can modify.
-
-Can be any JSON that includes app-specific info, such as identity providers, roles, and other
-access control information.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- data
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for user_metadata that a user can modify. Can be any JSON.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's email.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email_change_token
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-An email change token.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email_confirm
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>boolean</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Sets if a user has confirmed their email address.
-
-Only a service role can modify.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- password
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's password.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- phone
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's phone.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- phone_confirm
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>boolean</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-Sets if a user has confirmed their phone number.
-
-Only a service role can modify.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- user_metadata
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for user_metadata.
-
-Can be any JSON.
-
-Only a service role can modify.
-
-Note: When using the GoTrueAdminApi and wanting to modify a user's user_metadata,
-this attribute is used instead of UserAttributes data.
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-- Requires a `service_role` key.
-- This function should only be called on a server. Never expose your `service_role` key in the browser.
-
-## Examples
-
-### Updates a user's email.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { email: '[email protected]' }
-)
-```
-
-### Updates a user's password.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { password: 'new_password' }
-)
-```
-
-### Updates a user's metadata.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { user_metadata: { hello: 'world' } }
-)
-```
-
-### Updates a user's app_metadata.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { app_metadata: { plan: 'trial' } }
-)
-```
-
-### Confirms a user's email address.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { email_confirm: true }
-)
-```
-
-### Confirms a user's phone number.
-
-```js
-const { data: user, error } = await supabase.auth.api.updateUserById(
- '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
- { phone_confirm: true }
-)
-```
diff --git a/apps/reference/_supabase_js/generated/auth-update.mdx b/apps/reference/_supabase_js/generated/auth-update.mdx
deleted file mode 100644
index 7010074dcbc..00000000000
--- a/apps/reference/_supabase_js/generated/auth-update.mdx
+++ /dev/null
@@ -1,178 +0,0 @@
----
-id: auth-update
-title: 'update()'
-slug: /auth-update
-custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
----
-
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
-
-Updates user data, if there is a logged in user.
-
-```js
-const { user, error } = await supabase.auth.update({ email: '[email protected]' })
-```
-
-## Parameters
-
-<ul className="method-list-group">
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- UserAttributes
- </span>
- <span className="method-list-item-label-badge required">
- required
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-No description provided.
-
- </div>
-
-<ul className="method-list-group">
- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- data
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>object</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-A custom data object for user_metadata that a user can modify. Can be any JSON.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's email.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- email_change_token
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-An email change token.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- password
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's password.
-
- </div>
-
-</li>
-
-<li className="method-list-item">
- <h4 className="method-list-item-label">
- <span className="method-list-item-label-name">
- phone
- </span>
- <span className="method-list-item-label-badge false">
- optional
- </span>
- <span className="method-list-item-validation">
- <code>string</code>
- </span>
- </h4>
- <div class="method-list-item-description">
-
-The user's phone.
-
- </div>
-
-</li>
-
-</ul>
-
-</li>
-
-</ul>
-
-## Notes
-
-User email: Email updates will send an email to both the user's current and new email with a confirmation link by default.
-To toggle this behavior off and only send a single confirmation link to the new email, toggle "Double confirm email changes" under "Authentication" -> "Settings" off.
-
-User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).
-Use the `update()` method if you have data which rarely changes or is specific only to the logged in user.
-
-## Examples
-
-### Update email for authenticated user.
-
-Sends a "Confirm Email Change" email to the new email address.
-
-```js
-const { user, error } = await supabase.auth.update({ email: '[email protected]' })
-```
-
-### Update password for authenticated user.
-
-```js
-const { user, error } = await supabase.auth.update({ password: 'new password' })
-```
-
-### Update a user's metadata.
-
-```js
-const { user, error } = await supabase.auth.update({
- data: { hello: 'world' },
-})
-```
diff --git a/apps/reference/nav/supabase_js_sidebars.js b/apps/reference/nav/supabase_js_sidebars.js
index 93e5c785c99..cd44846aff8 100644
--- a/apps/reference/nav/supabase_js_sidebars.js
+++ b/apps/reference/nav/supabase_js_sidebars.js
@@ -41,11 +41,11 @@ const sidebars = {
'generated/auth-signout',
'generated/auth-getsession',
'generated/auth-getuser',
- 'generated/auth-update',
+ 'generated/auth-updateuser',
'generated/auth-setsession',
'generated/auth-onauthstatechange',
- 'generated/auth-api-getuser',
- 'generated/auth-api-resetpasswordforemail',
+ 'generated/auth-getuser',
+ 'generated/auth-resetpasswordforemail',
],
collapsed: true,
},
@@ -53,14 +53,13 @@ const sidebars = {
type: 'category',
label: 'Auth (Server Only)',
items: [
- 'generated/auth-api-listusers',
- 'generated/auth-api-createuser',
- 'generated/auth-api-deleteuser',
- 'generated/auth-api-generatelink',
- 'generated/auth-api-inviteuserbyemail',
- // 'generated/auth-api-sendmobileotp',
- 'generated/auth-api-getuserbyid',
- 'generated/auth-api-updateuserbyid',
+ 'generated/auth-admin-listusers',
+ 'generated/auth-admin-createuser',
+ 'generated/auth-admin-deleteuser',
+ 'generated/auth-admin-generatelink',
+ 'generated/auth-admin-inviteuserbyemail',
+ 'generated/auth-admin-getuserbyid',
+ 'generated/auth-admin-updateuserbyid',
],
collapsed: true,
},
diff --git a/apps/www/next.config.js b/apps/www/next.config.js
index acba685a82f..5933cf6be18 100644
--- a/apps/www/next.config.js
+++ b/apps/www/next.config.js
@@ -1413,6 +1413,56 @@ module.exports = withMDX({
source: '/docs/guides/local-development',
destination: '/docs/guides/cli/local-development',
},
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-update',
+ destination: '/docs/reference/javascript/auth-updateuser',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-getuser',
+ destination: '/docs/reference/javascript/auth-getuser',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-resetpasswordforemail',
+ destination: '/docs/reference/javascript/auth-resetpasswordforemail',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-listusers',
+ destination: '/docs/reference/javascript/auth-admin-listusers',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-createuser',
+ destination: '/docs/reference/javascript/auth-admin-createuser',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-deleteuser',
+ destination: '/docs/reference/javascript/auth-admin-deleteuser',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-generatelink',
+ destination: '/docs/reference/javascript/auth-admin-generatelink',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-inviteuserbyemail',
+ destination: '/docs/reference/javascript/auth-admin-inviteuserbyemail',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-getuserbyid',
+ destination: '/docs/reference/javascript/auth-admin-getuserbyid',
+ },
+ {
+ permanent: true,
+ source: '/docs/reference/javascript/auth-api-updateuserbyid',
+ destination: '/docs/reference/javascript/auth-admin-updateuserbyid',
+ },
]
},
})