カスタムページ
カスタムページを有効にするには、以下の設定を Auth.js の設定に追加します。pages
オブジェクトでは、キーがページの種類、値がページの場所を示すパス/ルートです。指定されたルートにページが存在することを確認してください。
./auth.ts
import { NextAuth } from "next-auth"
import GitHub from "next-auth/providers/github"
// Define your configuration in a separate variable and pass it to NextAuth()
// This way we can also 'export const config' for use later
export const config = {
providers: [GitHub],
pages: {
signIn: "/login",
},
}
export const { signIn, signOut, handle } = NextAuth(config)
カスタムページの設定を続けるには、カスタムページに関するガイドをご覧ください。