Last updated

Slack login

Adding Slack social login to your login page allows users to sign in to your website or application using their existing Slack account, making the login process faster and more convenient.


To enable Slack social login, you will:

  • Enable Slack as a social login in the builder
  • Create a Slack App

Follow the steps below for a smooth integration.

Enabling slack login in builder

  1. Open the Frontegg portal.
  2. Click on the Login Box button.
  3. In the left panel, toggle Slack to on.

Slack-Login-1

  1. Click the Review to Publish button and Publish to Dev.

You can have up to four social login options on your login page.

Creating a slack app

Complete the following steps to configure Slack login.

Step 1: Open project

  1. Go to the Slack API, click on Your Apps, and then select Create an App.

Slack-Login-2

Step 2: Register your application

  1. Click Create New App at the top of the page.

Slack-Login-3

  1. In the dialog that appears, choose From Scratch.

Slack-Login-4

  1. Pick a name and a Workspace for your app, then click Create App.

Slack-Login-5

  1. To configure the app properly for social login, follow these steps:

    • In the left-side navigation, click on OAuth & Permissions.
    • Under Redirect URLs, add the redirect URL to which the user will be redirected upon successful login.
      • If you are using the Hosted login method, your Redirect URL should be:
        https://[YOUR-FRONTEGG-DOMAIN].frontegg.com/oauth/account/social/success.
      • If you are using the Embedded Login method, the Redirect URL should be:
        https://[YOUR-APP-URL]/account/social/success, for example: http://localhost:3000/account/social/success.
    • Click Save URLs to save the URL.

Slack-Login-6

  1. Next, add scopes for retrieving user information from Slack:
    • Go to ScopesUser Token Scopes and add the following scopes:
      • email
      • profile
      • openid

Slack-Login-7

  1. Now, install the app to the Slack Workspace:
    • At the top of the OAuth & Permissions page, click Install to Workspace.

Slack-Login-8

  • When prompted, click Allow to grant your app the required permissions.
  1. Under SettingsManage Distribution, scroll to the Public Distribution section:
    • Approve the removal of any hardcoded information under Remove Hard Coded Information.

Slack-Login-9

  • Click Activate Public Distribution.

Step 3: Retrieve Slack credentials

  1. Go to SettingsBasic Information in your Slack app.
  2. Under App Credentials, copy the Client ID and Client Secret.

Slack-Login-10

Step 4: Configure Slack in Frontegg

  1. In the Frontegg portal, navigate to [ENVIRONMENT] → Configurations → Authentication → Social logins.
  2. Click Manage on the Slack card.
  3. Choose Custom, and enter the Client ID and Client Secret from your Slack app.

Slack-Login-11

  1. Save your changes.

Step 5: Test Slack login integration

  1. In your application, verify that the Slack login button appears.
  2. Test logging in with Slack to confirm successful integration.

Configuring Slack Login Permissions

By default, only invited users can log in with Slack. To allow new users to sign up via Slack, enable Allow Signup in the Login Box builder's left panel.


Customizing authentication scopes for Slack

Scopes let you specify what information your application can access after users grant permission. By default, Frontegg retrieves user profile and email scopes. To add additional scopes:

  1. In the Frontegg portal, navigate to [ENVIRONMENT] → Configurations ➜ Authentication → Social logins → Custom → Scopes.
  2. For reference on supported scopes, see Slack's supported scopes documentation.