-
-
Notifications
You must be signed in to change notification settings - Fork 343
Fix - Set custom jwt as auth token #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@w3b6x9 Can you please review it? |
@itsgouthamraj take a look at https://supabase.com/docs/guides/realtime/postgres-changes#custom-tokens. Also, |
@w3b6x9 It doesn't fix the issue. Also about |
@itsgouthamraj yes t's setting |
@w3b6x9 Got it. Also https://supabase.com/docs/guides/realtime/postgres-changes#custom-tokens, this doesn't fix this. In fact, it throws a web-socket connection error when we use any key other than the anon key. Since |
Hey supabase team, any updates on this? |
@itsgouthamraj I'll address it here: supabase/realtime#470. |
What kind of change does this PR introduce?
Bug fix - Initializing realtime client failing when custom JWT sent through Authorization header
Please find the issue here
What is the current behavior?
If the custom JWT is sent through global Authorization Header then this custom JWT is used as apikey while making new realtime connection. This behaviour is added in this pr
What is the new behavior?
If the custom JWT is sent through headers, we create new realtime client using supabasekey as apikey and then we use setAuth function to set the custom JWT
Additional context
Please find this issue created in realtime repo