Skip to content
The Auth.js project is now part of Better Auth.

Slack Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/slack

Environment Variables

AUTH_SLACK_ID AUTH_SLACK_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth" import Slack from "next-auth/providers/slack"   export const { handlers, auth, signIn, signOut } = NextAuth({  providers: [Slack], })

Notes

  • Slack requires that the redirect URL of your app uses https, even for local development. An easy workaround for this is using a service like ngrok that creates a secure tunnel to your app, using https. Remember to set the url as AUTH_URL as well.
Auth.js © Better Auth Inc. - 2025