Mattermost 提供商
资源
设置
回调 URL
https://example.com/api/auth/callback/mattermost
环境变量
AUTH_MATTERMOST_ID
AUTH_MATTERMOST_SECRET
AUTH_MATTERMOST_ISSUER
配置
/auth.ts
import NextAuth from "next-auth"
import Mattermost from "next-auth/providers/mattermost"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Mattermost],
})
备注
- 要创建您的 Mattermost OAuth2 应用程序,请访问
http://<your Mattermost instance url>/<your team>/integrations/oauth2-apps
- Mattermost 提供商需要设置
issuer
选项。这是您的 Mattermost 实例的基 URL。例如https://my-cool-server.cloud.mattermost.com