Closed acupofjose closed 3 years ago
@acupofjose we're in the process of enabling JWT auth to realtime so apologies if the documentation isn't clear.
Looks like SECURE_CHANNELS
is already set to "true"
in your docker-compose.yml
, which means you'll have to set your JWT_SECRET
to the secret used to sign your JWT. Then, you can pass in your JWT like this:
const client = new RealtimeClient("ws://localhost:4000/socket", { params: { token: "your_jwt" }})
If you don't want to enable JWT auth, you can set SECURE_CHANNELS
to "false"
and everything should continue to work as expected. When SECURE_CHANNELS
is set to "false"
, you don't have to set JWT_SECRET
.
I'll go ahead and update @supabase/realtime-js
documentation to reflect what I've written here.
Let me know if you have any other questions.
Hope that helped!
@w3b6x9 awesome, that's exactly what I was looking for, thank you! Trying to get the @supabase/realtime-csharp
library written and was struggling to understand how to pass the token
.
Question
Using the current release of
@supabase/realtime-js
I am unable to connect to the latest release of@supabase/realtime
. Following the documentation of the breaking changes in v0.10, what are client opening requests supposed to include?A
token
query param? Aheader
?To Reproduce
docker-compose.yml
index.js
Terminal Output
Application Output
Expected behavior
A connection to the realtime socket.
System information