Interface: CallbackOptions
Defined in: packages/oauth/src/callback-options.ts:7
Properties
afterInstallation()?
optional afterInstallation: (installation, options, callbackReq, callbackRes) => Promise<boolean>;
Defined in: packages/oauth/src/callback-options.ts:33
An additional logic to run right after executing the Slack app installation with the given OAuth code parameter.
When this method returns false, the InstallProvider skips storing the installation in database. You can set false when your app needs to cancel the installation (you can call auth.revoke API method for it) and then, the app needs to display an error page to the installing user.
Also, when returning false, this method is responsible to call callbackRes#end() method to build complete HTTP response for end-users.
Parameters
installation
Installation
<"v1"
| "v2"
, boolean
> | OrgInstallation
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
Promise
<boolean
>
beforeInstallation()?
optional beforeInstallation: (options, callbackReq, callbackRes) => Promise<boolean>;
Defined in: packages/oauth/src/callback-options.ts:17
An additional logic to run right before executing the Slack app installation with the given OAuth code parameter.
When this method returns false, the InstallProvider skips the installation. You can set false when the visiting user is not eligible to proceed with the Slack app installation flow.
Also, when returning false, this method is responsible for calling the callbackRes#end() method to build a complete HTTP response for end-users.
Parameters
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
Promise
<boolean
>
failure()?
optional failure: (error, options, callbackReq, callbackRes) => void;
Defined in: packages/oauth/src/callback-options.ts:63
Parameters
error
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
void
failureAsync()?
optional failureAsync: (error, options, callbackReq, callbackRes) => Promise<void>;
Defined in: packages/oauth/src/callback-options.ts:72
Parameters
error
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
Promise
<void
>
success()?
optional success: (installation, options, callbackReq, callbackRes) => void;
Defined in: packages/oauth/src/callback-options.ts:43
Parameters
installation
Installation
<"v1"
| "v2"
, boolean
> | OrgInstallation
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
void
successAsync()?
optional successAsync: (installation, options, callbackReq, callbackRes) => Promise<void>;
Defined in: packages/oauth/src/callback-options.ts:52
Parameters
installation
Installation
<"v1"
| "v2"
, boolean
> | OrgInstallation
options
callbackReq
IncomingMessage
callbackRes
ServerResponse
Returns
Promise
<void
>