I'm trying to implement HTTP-based Email Provider as described here.
How to reproduce
In a nexjs app add file api/auth/[...nextauth]/authOptions.ts that looks like this:
import NextAuth, { NextAuthOptions } from "next-auth"
import { PrismaAdapter } from "@auth/prisma-adapter"
import prisma from "@/lib/prisma"; // a global client for dev use
export const authOptions: NextAuthOptions = {
adapter: PrismaAdapter(prisma),
providers: [
{
id: 'sendgrid',
type: 'email',
async sendVerificationRequest({identifier: email, url}) {
}
}
],
}
In VS Code observe that you get a type error for the type:'email' on the sendgrid provider. If you change the type to ''oauth" the error goes away.
I've tried using the experimental version where the error goes away, but then I see that middleware is not supported, and it's the nodemailer error I get when doing stuff there that make me try http based email.
Also sendVerificationRequest seems to not be recognised.
Expected behavior
I expect email type and sendVerificationRequest to be supported
Provider type
Custom provider
Environment
System: OS: macOS 14.0 CPU: (10) arm64 Apple M1 Max Memory: 26.67 GB / 64.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node Yarn: 1.22.17 - ~/.yarn/bin/yarn npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm pnpm: 8.6.7 - ~/.nvm/versions/node/v19.9.0/bin/pnpm Browsers: Chrome: 118.0.5993.70 Safari: 17.0
Reproduction URL
https://github.com/kjetilge/Fagfilm-2023/tree/dev
Describe the issue
I'm trying to implement HTTP-based Email Provider as described here.
How to reproduce
In a nexjs app add file api/auth/[...nextauth]/authOptions.ts that looks like this:
In VS Code observe that you get a type error for the type:'email' on the sendgrid provider. If you change the type to ''oauth" the error goes away. I've tried using the experimental version where the error goes away, but then I see that middleware is not supported, and it's the nodemailer error I get when doing stuff there that make me try http based email.
Also sendVerificationRequest seems to not be recognised.
Expected behavior
I expect email type and sendVerificationRequest to be supported