-
Notifications
You must be signed in to change notification settings - Fork 17
Reconnect with authenticator when receiving TokenExpired event #653
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
…websocket renewal
Codecov Report
@@ Coverage Diff @@
## 7-dev #653 +/- ##
==========================================
- Coverage 86.16% 85.65% -0.51%
==========================================
Files 36 36
Lines 1662 1708 +46
Branches 302 309 +7
==========================================
+ Hits 1432 1463 +31
- Misses 173 183 +10
- Partials 57 62 +5
Continue to review full report at Codecov.
|
…ed in when a reconnect / tokenExpired event is triggered
…trying to re authenticate
What has been done
GoalThe ultimate goal of those changes is to only do a reauthentication when we were previously logged in, this is possible thanks to the events Why doing a
|
76382cc
to
6f90c28
Compare
0b913ed
to
95900eb
Compare
Other EnhancementsReconnection issueThere was a bug were the reconnection process was executed twice because calling
This was the cause of a double Now the Disconnected event emitted multiples timesI noticed that the Now the Why those changes ?To me, it makes sense that the |
Co-authored-by: Alexandre Bouthinon <[email protected]>
Co-authored-by: Alexandre Bouthinon <[email protected]>
What does this PR do ?
When the SDK subscribe to realtime notification and the authentication expire, Kuzzle send a
TokenExpired
notification.When the SDK receive this notification, it unsubscribe from every realtime subscriptions.
A proper re-authentification mechanism should be implemented instead when the
authenticator
property has been set