The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: add refreshSession() (#9839)
j4w8ncde159d06a0f
diff --git a/apps/reference/nav/supabase_js_sidebars.js b/apps/reference/nav/supabase_js_sidebars.jsindex f354bb7cbd1..fe2fa42f79d 100644--- a/apps/reference/nav/supabase_js_sidebars.js+++ b/apps/reference/nav/supabase_js_sidebars.js@@ -44,6 +44,7 @@ const sidebars = {'generated/auth-getuser','generated/auth-updateuser','generated/auth-setsession',+ 'generated/auth-refreshsession','generated/auth-onauthstatechange','generated/auth-resetpasswordforemail',],diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.ymlindex 876e455e63f..004f2066040 100644--- a/spec/supabase_js_v2.yml+++ b/spec/supabase_js_v2.yml@@ -345,6 +345,25 @@ pages:```jsconst { data, error } = supabase.auth.setSession(refresh_token)```+ auth.refreshSession():+ title: 'refreshSession()'+ $ref: '@supabase/gotrue-js.GoTrueClient.refreshSession'+ notes: |+ - This method will refresh the session whether the current one is expired or not.+ - Both examples destructure `user` and `session` from `data`. This is not required; so `const { data, error } =` is also valid.+ examples:+ - name: Refresh session using the current session+ isSpotlight: true+ js: |+ ```js+ const { data: { user, session }, error } = await supabase.auth.refreshSession()+ ```+ - name: Refresh session using a passed-in session+ isSpotlight: true+ js: |+ ```js+ const { data: { user, session }, error } = await supabase.auth.refreshSession({ refresh_token })+ ```auth.onAuthStateChange():title: 'onAuthStateChange()'$ref: '@supabase/gotrue-js.GoTrueClient.onAuthStateChange'