Mastodon プロバイダー
リソース
設定
コールバックURL
https://example.com/api/auth/callback/mastodon
環境変数
AUTH_MASTODON_ID
AUTH_MASTODON_SECRET
AUTH_MASTODON_ISSUER
設定
/auth.ts
import NextAuth from "next-auth"
import Mastodon from "next-auth/providers/mastodon"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Mastodon],
})
備考
- Mastodonのアーキテクチャ上、認証対象のインスタンスURLを
issuer
として定義する必要があります。