Connect Slack to Auth0
1
Slack Setup
- Sign up for a Slack Developer account.
- If you haven’t already, create a Slack App. Choose the From scratch option, give it a name and choose a workspace.
- Once your app is created, copy the Client ID and Client Secret.
- In the OAuth & Permissions section on the left side navigation, do
the following:
- Under OAuth Tokens, opt in for token rotation so that the app supports refresh tokens.
- Under Redirect URLs, add
https://YOUR_AUTH0_DOMAIN/login/callbackas a new Redirect URL.You can find the Auth0 domain in the Auth0 Dashboard.You can find this under Applications > [Your Application] > Settings > Basic Information > Domain.If you are using the custom domains feature, your Auth0 domain is the custom domain. You can find this under Branding > Custom Domains. - Under Scopes, add the necessary OAuth scopes your app needs to function.
2
Configure the Slack Social Connection in Auth0
- In the Auth0 Dashboard, navigate to Authentication > Social. Select Create Connection and then Sign in with Slack. Click Continue.
- In General, enter the Client ID and Client Secret from the Slack OAuth app you created.
- In Purpose, toggle Use for Connected Accounts for Token Vault. This allows the connection to retrieve and securely store access tokens for external APIs . To learn more, read Configure Connected Accounts for Token Vault.
- Click Create.
- After saving, go the Applications tab and select the applications that should use this connection.
This guide walks you through setting up the Slack connection in Auth0. For an end-to-end example that shows how to set up your app to call third-party APIs on the user's behalf using a connection like this, read the Call Other's APIs on User's Behalf Quickstart.
Token Vault configuration Example
To configure the Token Vault for your GitHub connection, you can use the following code snippet in your application:- JavaScript
- Python
Next steps
- To learn how to configure applications to access Token Vault, read Configure Token Vault.
- To learn how to get an access token to make a tool call, complete the Call other’s APIs on user’s behalf Quickstart.