diff --git a/server/auth/slack.js b/server/auth/slack.js index f2bf9a6747..1e98bf8478 100644 --- a/server/auth/slack.js +++ b/server/auth/slack.js @@ -44,6 +44,12 @@ router.get('slack.callback', auth({ required: false }), async ctx => { ctx.assertPresent(code || error, 'code is required'); ctx.assertPresent(state, 'state is required'); + console.log('>>>>>>>>>>>>>>>>>>>>>>>'); + console.log('STATE: ', state); + console.log('<<<<<<<<<<<<<<<<<<<<<<<'); + console.log('COOK STATE: ', ctx.cookies.get('state')); + console.log('<<<<<<<<<<<<<<<<<<<<<<<'); + if (state !== ctx.cookies.get('state')) { ctx.redirect('/?notice=auth-error&error=state_mismatch'); return;