mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix email signin?
This commit is contained in:
@@ -46,7 +46,7 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
async signIn({ account, email }) {
|
async signIn({ account, email }) {
|
||||||
// if user sigin requested magic link via EmailProvider
|
// if user sigin requested magic link via EmailProvider
|
||||||
if (account.provider === 'email') {
|
if (account.provider === 'email') {
|
||||||
if (email.verificationRequest) {
|
if (email?.verificationRequest) {
|
||||||
// only allow admins by email entered
|
// only allow admins by email entered
|
||||||
return account.providerAccountId === ADMIN_EMAIL
|
return account.providerAccountId === ADMIN_EMAIL
|
||||||
}
|
}
|
||||||
@@ -61,4 +61,4 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user