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