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

Improved Sugar client token refresh flow #205

Merged
merged 1 commit into from
May 26, 2023
Merged

Conversation

eatyourgreens
Copy link
Contributor

  • Emit a 'refresh' event from auth for each new token.
  • Refactor sugarClient.refreshToken() to update the Sugar client token on refresh events.
  • Reconnect to Primus when the token changes, so that the Primus URL changes.

- Emit a 'refresh' event from `auth` for each new token.
- Refactor `sugarClient.refreshToken()` to update the Sugar client token on `refresh` events.
- Reconnect to Primus when the token changes, so that the Primus URL changes.
@eatyourgreens
Copy link
Contributor Author

Changes look good on zooniverse/Panoptes-Front-End#6608. I'm subscribed to channels, as expected, when I'm logged in.

@eatyourgreens eatyourgreens merged commit 0ecb4cc into master May 26, 2023
@eatyourgreens eatyourgreens deleted the sugar-token-refresh branch May 26, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant