Skip to content

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

chore: document email and password for auth.update (#3262)

Thor 雷神 Schaeff029228c18446
diff --git a/web/spec/supabase.yml b/web/spec/supabase.yml
index 3608a9a9bec..dc9a6bb9b49 100644
--- a/web/spec/supabase.yml
+++ b/web/spec/supabase.yml
@@ -423,9 +423,23 @@ pages:
auth.update():
$ref: '@supabase/gotrue-js."GoTrueClient".GoTrueClient.update'
notes: |
- It's generally better to store user data in a table inside your public schema (i.e. `public.users`).
+ User email: email updates will send an email to both the user's current and new email with a confirmation link.
+
+ 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:
+ - name: Update email for authenticated user.
+ isSpotlight: true
+ js: |
+ ```js
+ const { user, error } = await supabase.auth.update({email: '[email protected]'})
+ ```
+ - name: Update password for authenticated user.
+ isSpotlight: true
+ js: |
+ ```js
+ const { user, error } = await supabase.auth.update({password: 'new password'})
+ ```
- name: Update a user's metadata.
isSpotlight: true
js: |