I’m trying to set up OAuth2 manually so my users can sign up and log in with Slack. I’ve been following ambroisedlg’s guide but the Slack setup is different and I’m getting stuck. Hopefully someone can help!
Here’s what I’ve done so far:
Create a button (Sign up with Slack) that takes you to a new page (slack_auth)
Create the slack_auth page (complete with loading animation) and the following workflows:
- Create API call for getting an access token:
and for accessing User Information:
Slack doesn’t appear to require token refreshes so I skipped the steps for handling that and have tried to put the authentication token returned using the ‘Get Token’ API call (code=****** in the URL) into the ‘User Info’ API call as the token. Every time I try to initialize this call it returns “invalid_auth” which according to the documentation means my token is no good or my IP isn’t allowed to make requests. I assume my IP hasn’t been black listed by Slack so why is my token not being accepted?
Huge thanks to anyone who can help, I’ve been stuck on this for days.