The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: adds instructions for resetting password after email sent
awalias4829204d91e4
diff --git a/web/docs/client/auth-forgotpassword.mdx b/web/docs/client/auth-forgotpassword.mdxindex 88d443d08e4..0df4ea284e3 100644--- a/web/docs/client/auth-forgotpassword.mdx+++ b/web/docs/client/auth-forgotpassword.mdx@@ -7,8 +7,44 @@ slug: auth-forgotpasswordimport Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';+<Tabs+ defaultValue="js"+ groupId="libraries"+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>++<TabItem value="js">++```js+const { data, error } = supabase.auth.api.resetPasswordForEmail('[email protected]')+```+++</TabItem>+<TabItem value="py">++```py+# Not yet implemented+```+++</TabItem>++</Tabs>+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 auth.api+ .updateUser(access_token, { password : new_password })+```+## Parametersdiff --git a/web/docs/client/auth-resetpasswordforemail.mdx b/web/docs/client/reset-password-email.mdxsimilarity index 70%rename from web/docs/client/auth-resetpasswordforemail.mdxrename to web/docs/client/reset-password-email.mdxindex 4c12038ffac..e585ccb0bd6 100644--- a/web/docs/client/auth-resetpasswordforemail.mdx+++ b/web/docs/client/reset-password-email.mdx@@ -1,14 +1,12 @@----id: auth-resetpasswordforemail-title: "auth.resetPasswordForEmail()"-slug: auth-resetpasswordforemail+id: reset-password-email+title: "Reset Password (Email)"+slug: reset-password-email---import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';-Sends a reset request to an email address.-<TabsdefaultValue="js"groupId="libraries"@@ -33,6 +31,20 @@ const { data, error } = supabase.auth.api.resetPasswordForEmail('[email protected]'</Tabs>+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 auth.api+ .updateUser(access_token, { password : new_password })+```+## Parametersdiff --git a/web/docs/gotrue/client/api-getuser.mdx b/web/docs/gotrue/client/api-getuser.mdxindex 07cbb8982b0..b8b15072fdd 100644--- a/web/docs/gotrue/client/api-getuser.mdx+++ b/web/docs/gotrue/client/api-getuser.mdx@@ -65,7 +65,7 @@ A valid, logged-in JWT.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.getUser(access_token)```diff --git a/web/docs/gotrue/client/api-inviteuserbyemail.mdx b/web/docs/gotrue/client/api-inviteuserbyemail.mdxindex 950e3ef70ff..062b32fb50c 100644--- a/web/docs/gotrue/client/api-inviteuserbyemail.mdx+++ b/web/docs/gotrue/client/api-inviteuserbyemail.mdx@@ -65,7 +65,7 @@ The email address of the user.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.inviteUserByEmail('[email protected]')```diff --git a/web/docs/gotrue/client/api-refreshaccesstoken.mdx b/web/docs/gotrue/client/api-refreshaccesstoken.mdxindex 88cead7f477..4d65f1019ea 100644--- a/web/docs/gotrue/client/api-refreshaccesstoken.mdx+++ b/web/docs/gotrue/client/api-refreshaccesstoken.mdx@@ -65,7 +65,7 @@ A valid refresh token that was returned on login.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.refreshAccessToken(refresh_token)```diff --git a/web/docs/gotrue/client/api-resetpasswordforemail.mdx b/web/docs/gotrue/client/api-resetpasswordforemail.mdxindex 829d92eeed0..acc8b22c9ba 100644--- a/web/docs/gotrue/client/api-resetpasswordforemail.mdx+++ b/web/docs/gotrue/client/api-resetpasswordforemail.mdx@@ -65,7 +65,7 @@ The email address of the user.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.resetPasswordForEmail('[email protected]')```diff --git a/web/docs/gotrue/client/api-sendmagiclinkemail.mdx b/web/docs/gotrue/client/api-sendmagiclinkemail.mdxindex 2eb33caf787..0f94d94044b 100644--- a/web/docs/gotrue/client/api-sendmagiclinkemail.mdx+++ b/web/docs/gotrue/client/api-sendmagiclinkemail.mdx@@ -65,7 +65,7 @@ The email address of the user.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.sendMagicLinkEmail('[email protected]')```diff --git a/web/docs/gotrue/client/api-signinwithemail.mdx b/web/docs/gotrue/client/api-signinwithemail.mdxindex 095331ad655..2fd3e8f9521 100644--- a/web/docs/gotrue/client/api-signinwithemail.mdx+++ b/web/docs/gotrue/client/api-signinwithemail.mdx@@ -86,7 +86,7 @@ The password of the user.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.signInWithEmail('[email protected]', 'example-password')```diff --git a/web/docs/gotrue/client/api-signout.mdx b/web/docs/gotrue/client/api-signout.mdxindex 0a149798953..5665674b433 100644--- a/web/docs/gotrue/client/api-signout.mdx+++ b/web/docs/gotrue/client/api-signout.mdx@@ -65,7 +65,7 @@ A valid, logged-in JWT.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.signOut(access_token)```diff --git a/web/docs/gotrue/client/api-signupwithemail.mdx b/web/docs/gotrue/client/api-signupwithemail.mdxindex 626c8078892..4e1c17b3f5f 100644--- a/web/docs/gotrue/client/api-signupwithemail.mdx+++ b/web/docs/gotrue/client/api-signupwithemail.mdx@@ -86,7 +86,7 @@ The password of the user.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.signUpWithEmail('[email protected]', 'example-password')```diff --git a/web/docs/gotrue/client/api-updateuser.mdx b/web/docs/gotrue/client/api-updateuser.mdxindex a3e4b578f60..77c77588221 100644--- a/web/docs/gotrue/client/api-updateuser.mdx+++ b/web/docs/gotrue/client/api-updateuser.mdx@@ -86,7 +86,7 @@ The data you want to update.<TabItem value="js">```js-const { error, data } = await api+const { error, data } = await auth.api.updateUser(access_token, { password : 'Why Shinji?' })```diff --git a/web/sidebar_spec_supabase.js b/web/sidebar_spec_supabase.jsindex 68f9470cc49..6d72c6721ee 100644--- a/web/sidebar_spec_supabase.js+++ b/web/sidebar_spec_supabase.js@@ -9,7 +9,7 @@ module.exports = {{type: 'category',label: 'Auth',- items: ['client/auth-signup', 'client/auth-signin', 'client/auth-signout', 'client/auth-session', 'client/auth-user', 'client/auth-update', 'client/auth-onauthstatechange', 'client/auth-resetpasswordforemail'],+ items: ['client/auth-signup', 'client/auth-signin', 'client/auth-signout', 'client/auth-session', 'client/auth-user', 'client/auth-update', 'client/auth-onauthstatechange', 'client/reset-password-email'],collapsed: false,},{diff --git a/web/spec/gotrue.yml b/web/spec/gotrue.ymlindex 74de4f0252b..78ce93b72d7 100644--- a/web/spec/gotrue.yml+++ b/web/spec/gotrue.yml@@ -182,7 +182,7 @@ pages:- name: Sign up a new user with emailjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.signUpWithEmail('[email protected]', 'example-password')```@@ -192,7 +192,7 @@ pages:- name: Sign in a user with emailjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.signInWithEmail('[email protected]', 'example-password')```@@ -202,7 +202,7 @@ pages:- name: Send user a passwordless login link via emailjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.sendMagicLinkEmail('[email protected]')```@@ -212,7 +212,7 @@ pages:- name: Send a user an invite link to sign up via emailjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.inviteUserByEmail('[email protected]')```@@ -222,7 +222,7 @@ pages:- name: Send a user a password reset emailjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.resetPasswordForEmail('[email protected]')```@@ -232,7 +232,7 @@ pages:- name: Sign a user outjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.signOut(access_token)```@@ -242,7 +242,7 @@ pages:- name: Get the user details for a given userjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.getUser(access_token)```@@ -252,7 +252,7 @@ pages:- name: Update user info that Gotrue holds (also used for setting new passwords)js: |```js- const { error, data } = await api+ const { error, data } = await auth.api.updateUser(access_token, { password : 'Why Shinji?' })```@@ -262,6 +262,6 @@ pages:- name: Get a new access and refresh token using a valid refresh_tokenjs: |```js- const { error, data } = await api+ const { error, data } = await auth.api.refreshAccessToken(refresh_token)```diff --git a/web/spec/supabase.yml b/web/spec/supabase.ymlindex 0698be8c052..1e57bca1e80 100644--- a/web/spec/supabase.yml+++ b/web/spec/supabase.yml@@ -42,7 +42,7 @@ info:- auth.user()- auth.update()- auth.onAuthStateChange()- - auth.resetPasswordForEmail()+ - Reset Password (Email)- name: 'Data'items:- select()@@ -361,7 +361,7 @@ pages:# Not yet implemented```- auth.resetPasswordForEmail():+ Reset Password (Email):$ref: '@supabase/gotrue-js."GoTrueApi".GoTrueApi.resetPasswordForEmail'examples:- name: Reset password