mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-25 09:03:43 +08:00
chore: add next-auth-provider only if account is enabled
This commit is contained in:
@ -14,7 +14,8 @@ const prisma = new PrismaClient();
|
||||
export const authOptions: NextAuthOptions = {
|
||||
adapter: hasFeature("account") ? PrismaAdapter(prisma) : undefined,
|
||||
// https://next-auth.js.org/configuration/providers/oauth
|
||||
providers: [
|
||||
providers: hasFeature("account")
|
||||
? [
|
||||
EmailProvider({
|
||||
server: process.env.EMAIL_SERVER,
|
||||
from: "noreply@sqlchat.ai",
|
||||
@ -28,7 +29,8 @@ export const authOptions: NextAuthOptions = {
|
||||
clientId: process.env.GITHUB_ID,
|
||||
clientSecret: process.env.GITHUB_SECRET,
|
||||
}),
|
||||
],
|
||||
]
|
||||
: [],
|
||||
cookies: {
|
||||
sessionToken: {
|
||||
name: `next-auth.session-token`,
|
||||
|
Reference in New Issue
Block a user