@slack/oauth / InstallProvider
Defined in: packages/oauth/src/install-provider.ts:32
InstallProvider Class. Refer to InsallProviderOptions interface for the details of constructor arguments.
new InstallProvider(__namedParameters): InstallProvider;Defined in: packages/oauth/src/install-provider.ts:87
InstallProvider
installationStore: InstallationStore;Defined in: packages/oauth/src/install-provider.ts:38
optional stateStore: StateStore;Defined in: packages/oauth/src/install-provider.ts:35
authorize(source): Promise<AuthorizeResult>;Defined in: packages/oauth/src/install-provider.ts:177
Fetches data from the installationStore
InstallationQuery<boolean>
Promise<AuthorizeResult>
generateInstallUrl(
options,
stateVerification?,
state?): Promise<string>;Defined in: packages/oauth/src/install-provider.ts:415
Returns a URL that is suitable for including in an Add to Slack button Uses stateStore to generate a value for the state query param.
boolean = true
string
Promise<string>
handleCallback(
req,
res,
options?,
installOptions?): Promise<void>;Defined in: packages/oauth/src/install-provider.ts:485
This method handles the incoming request to the callback URL. It can be used as a RequestListener in almost any HTTP server framework.
Verifies the state using the stateStore, exchanges the grant in the query params for an access token, and stores token and associated data in the installationStore.
IncomingMessage
ServerResponse
Promise<void>
handleInstallPath(
req,
res,
options?,
installOptions?): Promise<void>;Defined in: packages/oauth/src/install-provider.ts:330
Handles the install path (the default is /slack/install) requests from an app installer.
IncomingMessage
ServerResponse
Promise<void>