To implement Sign in with Slack you need to create an OAuth 2.0 app in your Slack workspace.
Then follow these steps:
Install @slack/oauth package by running the command:
index.ts19 chars2 lines
Create an instance of the OAuthApp class:
index.ts737 chars24 linesCreate a callback that handles the installation of your app:
index.ts752 chars22 linesCreate a link to initiate Sign in with Slack flow:
index.ts553 chars16 linesWhen the user clicks the link, they'll be redirected to the Slack authorization page where they can sign in with their Slack credentials. Once they do that, your app receives an OAuth access token that you can use to make API calls on their behalf.
gistlibby LogSnag