use nextauth secret from env

This commit is contained in:
Thomas Ruoff
2021-11-21 01:12:53 +01:00
parent 24238eb2c1
commit 3d8662b54d

View File

@@ -10,6 +10,7 @@ let mongooseConnection: Mongoose;
export default async function auth(req: NextApiRequest, res: NextApiResponse) {
return await NextAuth(req, res, {
secret: process.env.NEXTAUTH_SECRET,
adapter: MongoDBAdapter({ db: (await connect()).connection.db }),
providers: [
EmailProvider({