Skip to content
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

fix: update channel join payload for successful reconnect #126

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

w3b6x9
Copy link
Member

@w3b6x9 w3b6x9 commented Dec 22, 2021

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Channel (subscription) is created with user_token with an expiration that never gets updated with setAuth (never refreshed). No successful reconnection after user_token has expired even though supabase-js is calling setAuth with refreshed token.

What is the new behavior?

setAuth will update each channel's join payload with the latest user_token.

Additional context

Related issue: #123

@w3b6x9 w3b6x9 changed the title fix: update channel params for successful reconnect fix: update channel join payload for successful reconnect Dec 22, 2021
@w3b6x9 w3b6x9 force-pushed the fix/reconnect-params branch from 0becc20 to a7cbb8d Compare December 22, 2021 02:10
@acupofjose
Copy link

Just to confirm - we are using user_token and access_token for the same token: user_token in the initial join push (and subsequent rejoins) and access_token on an already joined channel?

@w3b6x9
Copy link
Member Author

w3b6x9 commented Dec 24, 2021

@acupofjose that’s correct! We’ll consolidate the naming of the token in the future so it’s uniform. Sorry for the confusion!

@kamyker
Copy link

kamyker commented May 25, 2022

I have to say it's a bit weird that for every channel there is additional push call on every heartbeat. That doesn't sound very scalable and multiplexed.

@w3b6x9
Copy link
Member Author

w3b6x9 commented May 26, 2022

I have to say it's a bit weird that for every channel there is additional push call on every heartbeat. That doesn't sound very scalable and multiplexed.

@kamyker do you mean the additional push as a result of invoking setAuth?

@kamyker
Copy link

kamyker commented May 26, 2022

I have to say it's a bit weird that for every channel there is additional push call on every heartbeat. That doesn't sound very scalable and multiplexed.

@kamyker do you mean the additional push as a result of invoking setAuth?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants