Slack
Sign in with Slack accounts using OpenID Connect.
1. Create OAuth App
- Go to Slack API — Your Apps.
- Click Create New App > From scratch.
- Enter your app name and select a workspace, then click Create App.
- Go to OAuth & Permissions in the left sidebar.
- Under Redirect URLs, add your EdgeBase callback URL (see below), click Add, then click Save URLs.
- Under Scopes > User Token Scopes, add:
openidemailprofile
- Click Install to Workspace (or reinstall if you changed redirect URLs or scopes).
2. Set Redirect URI
Add your EdgeBase callback URL under OAuth & Permissions > Redirect URLs:
https://your-edgebase-url/api/auth/oauth/slack/callback
For local development:
Use an HTTPS tunnel that forwards to your local EdgeBase auth server, for example:
https://your-tunnel.example/api/auth/oauth/slack/callback
As of March 8, 2026, Slack's app console requires redirect URLs to begin with https://, so plain http://localhost:8787/... is rejected in the UI. A local tunnel such as cloudflared or ngrok is the practical approach for browser-based local testing.
3. Get Credentials
In Basic Information:
- Client ID — Listed as your app's Client ID.
- Client Secret — Listed as your app's Client Secret.
Slack also shows a User OAuth Token on the OAuth & Permissions page after installation. That token is not the clientSecret for EdgeBase. Use the Client ID and Client Secret from Basic Information.
4. Configure EdgeBase
// edgebase.config.ts
export default defineConfig({
auth: {
allowedOAuthProviders: ['slack'],
},
});
export default defineConfig({
auth: {
oauth: {
slack: {
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
},
},
},
});
5. Usage
- JavaScript
- Dart/Flutter
- Swift
- Kotlin
- Java
- C#
- C++
client.auth.signInWithOAuth('slack');
await client.auth.signInWithOAuth('slack');
let url = client.auth.signInWithOAuth(provider: "slack")
// Open url in SFSafariViewController or ASWebAuthenticationSession
client.auth.signInWithOAuth("slack")
client.auth().signInWithOAuth("slack");
client.Auth.SignInWithOAuth("slack");
OAuth requires a browser redirect flow. For C++ (Unreal Engine), handle OAuth in a platform webview and pass the token to the SDK.
Provider Details
| Property | Value |
|---|---|
| Scopes | openid email profile |
| PKCE | No |
| Yes | |
| Email verified | Always true (Slack policy) |
| Avatar | Yes — picture URL |
| Refresh token | No |
Notes
- Slack uses OpenID Connect (not standard OAuth2), so the endpoints are
openid.connect.authorizeandopenid.connect.token. - Slack emails are always considered verified (
email_verifiedis alwaystrue), so automatic account linking with existing email accounts will work. - The user ID comes from the
subclaim in the OpenID Connect response. - Your app must be installed to a workspace, but users from any workspace can sign in if your app is distributed.
- Use User Token Scopes, not Bot Token Scopes, for Slack sign-in.
- If Slack says the redirect URL must start with
https://, that is expected in the current console UI. Use an HTTPS tunnel for local browser testing. - Local verification was completed on March 8, 2026 using an HTTPS tunnel callback and the js-web browser harness. The current result was
7 passed / 2 skipped, where the skipped items were the intentional passkey reuse / no-auto-delete checks.