Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options: ConstructorOptions) {
const { verificationToken, skipLegacyProfile } = options;
if ('client' in options) {
this._client = options.client;
} else {
const { accessToken, origin } = options;
this._client = SlackOAuthClient.connect({
accessToken,
origin,
});
}
this._verificationToken = verificationToken || '';
this._skipLegacyProfile =
typeof skipLegacyProfile === 'boolean' ? skipLegacyProfile : true;
if (!this._verificationToken) {
warning(
false,
'`verificationToken` is not set. Will bypass Slack event verification.\nPass in `verificationToken` to perform Slack event verification.'
);
}