Connecting Slack to AuthRocket allows your users to login to your app using their Slack login. It’ll take just a few minutes in your browser, and takes no coding at all.
This guide assumes that logins are already working in your app.
If not, we recommend doing that first (even if you don’t intend to use password-based logins in production). This is because social logins and password logins function identically as far as your app is concerned.
Start by going to Realm -> Settings -> Authentication -> Slack.
Leave this here. Next we’re going to tell Slack about your app and we’ll need to add the Redirect URL(s) from this page to the Slack App configuration. We’ll come back to this page to fill in the rest of the fields in a moment.
Open another browser tab to Slack’s app configuration and login.
Then, click on Create New App.
Fill in your app’s name and select a Slack team that will have rights to manage this app inside Slack.
Then click on OAuth & Permissions in the left menu.
Under Redirect URLs, add each Redirect URL from AuthRocket (where we ended at step 1). Be sure to click Save URLs when you’re all done, otherwise Slack won’t save your work.
Now click on Basic Information in the left menu.
From the App Credentials section, copy and paste the Client ID and the Client Secret into their matching fields back in AuthRocket (same page where we left off). Click Add.
That’s it. Go to your LoginRocket page and you should see Login with Slack. Click it, login to Slack, and allow the login. If your app already accepts logins, you should be logged in. Even if not, you should see the user under Users in AuthRocket.
You may want to add your app’s logo and short description to your Slack App so it can be displayed on the login authorization page.
Congratulations, you’re done adding Slack logins to your app!