WorkOS Docs Homepage
Integrations

Slack OAuth

Learn how to set up OAuth with Slack.

Introduction

To configure your global Slack OAuth integration, you’ll need two pieces of information from WorkOS and two pieces of information from Slack.

From WorkOS:

  • A Redirect URI specific to Slack. This is where Slack will redirect users after they authenticate.
  • The Slack provider toggled on in the WorkOS Dashboard.

From Slack:

  • A Client ID
  • A Client Secret

Once you’ve finished configuration, users can authenticate into your application using their Slack accounts.

Within the WorkOS Dashboard, under Authentication, locate the Slack integration. There, you’ll find the Redirect URI. After Slack completes the OAuth flow, it sends users (along with an authorization code) back to this URI.

To integrate Sign in with Slack, you must have:

  1. An existing Slack App.
  2. Your app’s Client ID and Client Secret, found under your Slack App’s settings.
  3. The WorkOS Redirect URI, which you’ll add in Slack’s OAuth & Permissions settings.
  4. (Optional) A Slack workspace for testing or development before going live.
A screenshot of the Slack API portal showing the create new app button
  1. Navigate to the Slack App management page.
  2. If you don’t already have a Slack App, click Create New App, provide a name, and choose the development workspace where you’ll test.
  3. Once created, open your new Slack App to configure it.
A screenshot of the Slack API portal showing where to configure your redirect URI
  1. In your Slack App’s settings, go to OAuth & Permissions on the left-hand sidebar.
  2. Under Redirect URLs, add the Redirect URI from the WorkOS Dashboard.
  3. Click Save URLs to confirm.

Under Scopes, ensure you request the standard OpenID scopes (e.g., openid, profile, email), which Slack requires for Sign in with Slack using OIDC.

  1. Still in your Slack App’s settings, find your Client ID and Client Secret.
  2. Copy both values, as you’ll need to add them to WorkOS in the next step.
Screenshot of the WorkOS dashboard showing how to enable Slack OAuth
  1. In the WorkOS Dashboard, go to Authentication and scroll down to the Slack integration.
  2. Click Edit.
  3. Paste in the Client ID and Client Secret from your Slack App.
  4. Toggle Enabled on if it’s not already.
  5. Save your changes.
Screenshot of the WorkOS dashboard with the Slack OAuth connection enabled

Once you’ve configured everything:

  1. In your application, initiate the OAuth flow for Slack by directing users to WorkOS, specifying SlackOAuth as the provider.
  2. WorkOS will redirect users to Slack’s sign-in screen.
  3. After successful authentication, Slack returns users to the WorkOS redirect URI along with an authorization code.
  4. WorkOS finalizes the authentication, and your application receives the user’s Slack profile information.

You’re now ready to authenticate users with Slack in your production or development environment.

After completing these steps, your “Sign in with Slack” integration through WorkOS should be fully functional. If you need further guidance on scopes, token rotation, or JWT validation, see Slack’s Sign in with Slack documentation and the WorkOS SSO documentation.