mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
docs: add Realtime section on passing in refreshed tokens
This commit is contained in:
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
|
||||
Reference in new issue
Block a user