![]() When returning false, this method is responsible for calling the callbackRes#end() method to build a complete HTTP response for the end-user. A common use for returning false in this method is if the visiting user is not eligible to proceed with the Slack app installation flow. When this method returns false, the InstallProvider skips the installation. (options: InstallURLOptions, callbackReq: IncomingMessage, callbackRes: ServerResponse) => PromiseĪdditional logic to run right before executing the Slack app installation with the given OAuth code parameter. Returns Promise Interfaces AuthorizeResult Fields Name Verifies the state using the instance’s stateStore, exchanges the grant in the query parameters for an access token, and stores token and associated installation data in the instance’s installationStore.įetches installation data from the instance’s installationStore. It can be used as a RequestListener in almost any HTTP server framework. This method handles the incoming callback request to the application after a redirection from following a successful user authorization. Returns Promise handleCallback(req, res, options, installOptions) Can prescribe a specific state OAuth parameter value by setting the state argument to this function explicitly. Can disable state generation by setting stateVerification to false. Uses the instance’s stateStore to generate a value for the state OAuth parameter. Returns a URL that is suitable for including in an Add to Slack button. Returns Promise generateInstallUrl(options) It can be used to automatically render a typical installation page with an “Add to Slack” button. This method handles HTTP requests to the application’s installation page. Methods handleInstallPath(req, res, options, installOptions) new InstallProvider(opts)Ĭonstructs a new instance of the InstallProvider class It contains capabilities for OAuth URL generation, state verification, authorization code exchange, as well as interfaces for storing installation details like user and bot tokens. ![]() ![]() InstallProvider provides a way to manage configuration and functionality for adding an OAuth flow to Slack apps.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |