Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/minodisk/slack-verifier

Verify whether requests from Slack are authentic with a signed secrets using Web API
https://github.com/minodisk/slack-verifier

authentication edge slack v8 verifier webapi

Last synced: 20 days ago
JSON representation

Verify whether requests from Slack are authentic with a signed secrets using Web API

Awesome Lists containing this project

README

        

# slack-verifier

Verify whether requests from Slack are authentic with a signed secrets using Web APIs.
As a feature, it is intended to run on non-Node runtimes such as Cloudflare workers, so it is built using only the Web API.

## Installation

```
npm i slack-verifier
```

```
pnpm add slack-verifier
```

## Usage

```typescript
import verifier from "slack-verifier";

export default {
async fetch(request: Request): Promise {
const verify = verifier("your-signing-secret");
try {
await verify(request);
} catch (e) {
return new Response("Unauthorized", { status: 401 });
}
return new Response("OK");
},
};
```