Calling this method will trigger a popup window to appear containing a flow for the user to link their Cord user to a Slack user. Completion of the flow will additionally connect the user's Slack workspace to their Cord group if that Cord group is not already connected to a Slack workspace. Calling this method will not do anything if the Cord user is already linked to a Slack user.
Vanilla JavaScript:
window.CordSDK.user.connectToSlack((success) => console.log('Has user successfully signed into Slack', success));
window.CordSDK.user.connectToSlack((success)=>console.log('Has user successfully signed into Slack', success));
This callback will be called once the user has finished/cancelled the oauth process. If users interrupt the OAuth process by closing the popup window, this callback will not run. The argument passed to the callback is a boolean which states if the user has successfully connected Slack.