[go: up one dir, main page]

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 flow.

revokeAccess() => Promise<void>

Function to revoke Slack access for the current user.

isLoadingboolean

Whether an authentication operation is in progress.

Example#
Basic usage#

The following example demonstrates how to use the useSlackAuth hook to manage Slack authentication.