Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@slack/oauth

Package Overview
Dependencies
Maintainers
13
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/oauth - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

2

dist/index.d.ts

@@ -156,2 +156,4 @@ /// <reference types="node" />

authVersion?: AuthVersion;
/** A string value that can be held in the state parameter in the OAuth flow. */
metadata?: string;
}

@@ -158,0 +160,0 @@ /**

11

dist/index.js

@@ -69,3 +69,3 @@ "use strict";

function InstallProvider(_a) {
var clientId = _a.clientId, clientSecret = _a.clientSecret, _b = _a.stateSecret, stateSecret = _b === void 0 ? undefined : _b, _c = _a.stateStore, stateStore = _c === void 0 ? undefined : _c, _d = _a.installationStore, installationStore = _d === void 0 ? new MemoryInstallationStore() : _d, _e = _a.authVersion, authVersion = _e === void 0 ? 'v2' : _e, _f = _a.logger, logger = _f === void 0 ? undefined : _f, _g = _a.logLevel, logLevel = _g === void 0 ? logger_1.LogLevel.INFO : _g, _h = _a.clientOptions, clientOptions = _h === void 0 ? {} : _h, _j = _a.authorizationUrl, authorizationUrl = _j === void 0 ? 'https://slack.com/oauth/v2/authorize' : _j;
var clientId = _a.clientId, clientSecret = _a.clientSecret, _b = _a.stateSecret, stateSecret = _b === void 0 ? undefined : _b, _c = _a.stateStore, stateStore = _c === void 0 ? undefined : _c, _d = _a.installationStore, installationStore = _d === void 0 ? new MemoryInstallationStore() : _d, _e = _a.authVersion, authVersion = _e === void 0 ? 'v2' : _e, _f = _a.logger, logger = _f === void 0 ? undefined : _f, _g = _a.logLevel, logLevel = _g === void 0 ? undefined : _g, _h = _a.clientOptions, clientOptions = _h === void 0 ? {} : _h, _j = _a.authorizationUrl, authorizationUrl = _j === void 0 ? 'https://slack.com/oauth/v2/authorize' : _j;
if (clientId === undefined || clientSecret === undefined) {

@@ -82,3 +82,3 @@ throw new errors_1.InstallerInitializationError('You must provide a valid clientId and clientSecret');

else {
this.logger = logger_1.getLogger('OAuth:InstallProvider', logLevel, logger);
this.logger = logger_1.getLogger('OAuth:InstallProvider', logLevel !== null && logLevel !== void 0 ? logLevel : logger_1.LogLevel.INFO, logger);
}

@@ -108,3 +108,3 @@ // Setup stateStore

}
this.clientOptions = __assign({ logLevel: this.logger.getLevel() }, clientOptions);
this.clientOptions = __assign({ logger: logger, logLevel: this.logger.getLevel() }, clientOptions);
}

@@ -352,2 +352,7 @@ /**

}
if (installOptions !== undefined && installOptions.metadata !== undefined) {
// Pass the metadata in state parameter if exists.
// Developers can use the value for additional/custom data associated with the installation.
installation.metadata = installOptions.metadata;
}
if (!installation.isEnterpriseInstall) return [3 /*break*/, 14];

@@ -354,0 +359,0 @@ return [4 /*yield*/, this.installationStore.storeInstallation(installation, this.logger)];

{
"name": "@slack/oauth",
"version": "2.0.1",
"version": "2.1.0",
"description": "Official library for interacting with Slack's Oauth endpoints",

@@ -41,4 +41,4 @@ "author": "Slack Technologies, Inc.",

"dependencies": {
"@slack/logger": "^2.0.0",
"@slack/web-api": "^5.7.0",
"@slack/logger": "^3.0.0",
"@slack/web-api": "^6.0.0",
"@types/jsonwebtoken": "^8.3.7",

@@ -45,0 +45,0 @@ "@types/node": ">=12",

# Slack OAuth
[![build-ci](https://github.com/slackapi/node-slack-sdk/workflows/CI%20Build/badge.svg)](https://github.com/slackapi/node-slack-sdk/actions?query=workflow%3A%22CI+Build%22)
<!-- TODO: per-flag badge https://docs.codecov.io/docs/flags#section-flag-badges-and-graphs -->
[![codecov](https://codecov.io/gh/slackapi/node-slack-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/slackapi/node-slack-sdk)
<!-- TODO: npm versions with scoped packages: https://github.com/rvagg/nodei.co/issues/24 -->
The `@slack/oauth` package makes it simple to setup the OAuth flow for Slack apps. It supports [V2 OAuth](https://api.slack.com/authentication/oauth-v2) for Slack Apps as well as [V1 OAuth](https://api.slack.com/docs/oauth) for [Classic Slack apps](https://api.slack.com/authentication/quickstart). Slack apps that are installed in multiple workspaces, like in the App Directory or in an Enterprise Grid, will need to implement OAuth and store information about each of those installations (such as access tokens).

@@ -9,0 +4,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc