Slack Provider
Resources
Setup
Callback URL
https://example.com/api/auth/callback/slackEnvironment Variables
AUTH_SLACK_ID
AUTH_SLACK_SECRETConfiguration
/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_URLas well.