Skip to content

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

docs: add Realtime section on passing in refreshed tokens

Wen Bo Xie3bd669caf3e1
diff --git a/apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx b/apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx
index f9d2ff2e4d6..aa93a0482cf 100644
--- a/apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx
+++ b/apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx
@@ -363,6 +363,18 @@ const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY
})
```
+### Refreshed Tokens
+
+You will need to refresh tokens on your own, but once generated, you can pass them to Realtime.
+
+For example, if you're using the `supabase-js` `v2` client then you can pass your token like this:
+
+```js
+// Client setup
+
+supabase.realtime.setAuth('fresh-token')
+```
+
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export default Page