-
Notifications
You must be signed in to change notification settings - Fork 138
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: do not disconnect and connect when the accessToken is changed #969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@bang9 oh, wow! thank you so much!! let me check it out and resolve it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this fix been tested/verified?
When SDK fails at session key refresh with below error
err.isSessionTokenExpiredError || err.code === SendbirdErrorCode.APPLICATION_NOT_FOUND
SDK awaits customer callback onSessionTokenRequired
response to receive new auth token from customer. However, UIKit does not handle this automatically. Im not sure this is related to removing accessToekn dependency here but customer needs to handle onSessionTokenRequired outside UIKit in their own app. Am I understanding corrrecty?
synced offline with above question. There is no problem since UIKit opens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
## [v3.12.0] (Feb 16, 2024) ### Features: * Local cache is enabled by default * If desired, it can be disabled using sdkInitParams ```tsx import SendbirdProvider from '@sendbird/uikit-react/SendbirdProvider'; const App = () => ( <SendbirdProvider // ... sdkInitParams={{ localCacheEnabled: false }} /> ) ``` * Added `GroupChannel` and `GroupChannelList` modules. * With the introduction of `GroupChannel` and `GroupChannelList`, a new local caching feature has been added, allowing you to experience a more efficient chat environment. We provide a massive component called `App` that combines all the features. From now on, this component will use `GroupChannel` and `GroupChannelList` instead of `Channel` and `ChannelList`. If you wish to continue using `Channel` and `ChannelList`, you can use `enableLegacyChannelModules` to ensure the previous components are still available for use. ```tsx import SendbirdApp from '@sendbird/uikit-react/App'; const App = () => ( <SendbirdApp // ... enableLegacyChannelModules /> ); ``` * You can find detailed changes, usage instructions, and migration methods in the document here: [Migration Guide](https://github.com/sendbird/sendbird-uikit-react/blob/main/MIGRATION_COLLECTION.md) ### Fixes: * Fixed a bug where the session refresh failed when the `accessToken` was changed [#969](#969) * Fixed a bug causing infinite loading when the channel is not selected in the Channel module [#970](#970) * Fixed a bug where the mention feature was not functioning properly [#971](#971) * Fixed a bug where URLs with numbered top-level domains were treated as links [#972](#972) * Fixed a bug where message scroll delays were inconsistently applied [#975](#975) * Fixed a bug where `isUserIdUsedForNickname` was not functioning properly [#976](#976) * Optimized the rendering of `SendbirdProvider` * Optimized the SDK initialization logic for StrictMode
Description
accessToken
is changed,disconnect
andconnect
are called again.accessToken
, the session_key refresh performed by the SDK is canceled(API request cancel) due to thedisconnect
triggered in (1).accessToken
has already expired, it is refreshed by the SDK(SessionHandler). Therefore, UIKit does not need to rely on this value to handle the connect logic.ticket: CLNP-2257