feat: add user token secret management for channels
- Implemented user token secret generation and retrieval in channel service. - Added ResetUserTokenSecret method to reset the user token secret for channels. - Updated channel configuration parsing to include user token secret. - Enhanced WebSocket service to utilize user token secret for external info retrieval. - Modified dashboard channel edit component to support user token secret display and reset functionality. - Introduced API endpoint for resetting user token secret. - Updated IM and SDK configurations to include user token. - Added tests for user token verification logic.
This commit is contained in:
@@ -26,6 +26,12 @@ export function createImRealtimeConnection() {
|
||||
(config.externalSource ?? "web_chat").trim() || "web_chat"
|
||||
)
|
||||
const channelId = encodeURIComponent(config.channelId || "")
|
||||
const userToken = (config.userToken ?? "").trim()
|
||||
if (userToken) {
|
||||
return new WebSocket(
|
||||
`${baseUrl}/api/ws/open?channelId=${channelId}&userToken=${encodeURIComponent(userToken)}`
|
||||
)
|
||||
}
|
||||
const externalName = (config.externalName ?? "").trim()
|
||||
const nameQuery =
|
||||
externalName !== ""
|
||||
|
||||
Reference in New Issue
Block a user