microsoft sign in

This commit is contained in:
Dobromir Popov
2024-03-02 21:05:27 +02:00
parent bf5c88a556
commit 61a564ea55
2 changed files with 24 additions and 8 deletions

View File

@ -9,6 +9,9 @@ import EmailProvider from "next-auth/providers/email"
import CredentialsProvider from "next-auth/providers/credentials"
import { PrismaAdapter } from "@auth/prisma-adapter"
//microsoft
import AzureADProvider from "next-auth/providers/azure-ad";
// https://next-auth.js.org/getting-started/client
const common = require("../../../src/helpers/common");
@ -38,6 +41,11 @@ export const authOptions: NextAuthOptions = {
}
}
}),
AzureADProvider({
clientId: process.env.AZURE_AD_CLIENT_ID,
clientSecret: process.env.AZURE_AD_CLIENT_SECRET,
tenantId: process.env.AZURE_AD_TENANT_ID,
}),
CredentialsProvider({
// The name to display on the sign in form (e.g. 'Sign in with...')
name: 'Credentials',
@ -80,10 +88,10 @@ export const authOptions: NextAuthOptions = {
return null;
}
}),
AppleProvider({
clientId: process.env.APPLE_ID,
clientSecret: process.env.APPLE_SECRET
})
// AppleProvider({
// clientId: process.env.APPLE_ID,
// clientSecret: process.env.APPLE_SECRET
// })
/*
EmailProvider({
server: {