Add Slack oauth trigger
This commit is contained in:
parent
815d1a4dcd
commit
95e7eff734
2 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,10 @@ const queue = kue.createQueue({
|
|||
const slackToken = process.env.SLACK_TOKEN;
|
||||
|
||||
export default async function (ctx) {
|
||||
if (ctx.request.method === 'GET') {
|
||||
ctx.redirect('https://slack.com/oauth/authorize?client_id=349358389361.349904899522&team=TA9AJBFAM&install_redirect=general&scope=links:read,chat:write:bot');
|
||||
return;
|
||||
}
|
||||
if (ctx.request.body.challenge) {
|
||||
ctx.body = ctx.request.body.challenge;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue