Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/minodisk/slack-verifier
- Owner: minodisk
- License: apache-2.0
- Created: 2024-06-19T14:23:26.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-19T15:50:27.000Z (5 months ago)
- Last Synced: 2024-10-03T08:13:55.438Z (about 1 month ago)
- Topics: authentication, edge, slack, v8, verifier, webapi
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/slack-verifier
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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");
},
};
```