Skip to content

Commit 3c270dd

Browse files
authored
fix: do not disconnect and connect when the accessToken is changed (#969)
## Description 1. When the `accessToken` is changed, `disconnect` and `connect` are called again. 2. If the customer controls the `accessToken`, the session_key refresh performed by the SDK is canceled(API request cancel) due to the `disconnect` triggered in (1). 3. Even if the `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] [CLNP-2257]: https://sendbird.atlassian.net/browse/CLNP-2257?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 894949a commit 3c270dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/hooks/useConnect/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function useConnect(triggerTypes: TriggerTypes, staticTypes: Stat
4646
}).catch(error => {
4747
logger?.error?.('SendbirdProvider | useConnect/useEffect', error);
4848
});
49-
}, [userId, appId, accessToken]);
49+
}, [userId, appId]);
5050
const reconnect = useCallback(async () => {
5151
logger?.info?.('SendbirdProvider | useConnect/reconnect/useCallback', { sdk });
5252

0 commit comments

Comments
 (0)