In-App UI
React
Hooks
useSlackAuth
The useSlackAuth
hook is used to manage Slack authentication for connecting user accounts to Slack workspaces.
This hook does not accept any parameters.
A UseSlackAuthReturn
object with the following properties:
authenticate(options?: SlackAuthOptions) => Promise<void>
Function to initiate Slack authentication flow.
revokeAccess() => Promise<void>
Function to revoke Slack access for the current user.
isLoadingboolean
Whether an authentication operation is in progress.
The following example demonstrates how to use the useSlackAuth
hook to manage Slack authentication.