跳至內容
從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.

Mattermost 供應商

資源

設定

回調網址

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://<您的 Mattermost 實例網址>/<您的團隊>/integrations/oauth2-apps
  • Mattermost 供應商需要設定 issuer 選項。這是您的 Mattermost 實例的基本網址。例如 https://my-cool-server.cloud.mattermost.com
Auth.js © Balázs Orbán 和團隊 -2024