docs: add Realtime section on passing in refreshed tokens

This commit is contained in:
Wen Bo Xie committed 2023-04-05 17:39:56 +08:00
1 parent 68cc6647c7
commit 3bd669caf3
1 file changed
+12
@@ -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