Privacy error when using next auth magic link auth #2754
-
Hey I am using next-auth in the following way in my import { NextApiHandler } from "next";
import NextAuth from "next-auth";
import Providers from "next-auth/providers";
import Adapters from "next-auth/adapters";
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
const authHandler: NextApiHandler = (req, res) => NextAuth(req, res, options);
export default authHandler;
const options = {
providers: [
Providers.Email({
server: {
host: process.env.SMTP_HOST,
port: Number(process.env.SMTP_PORT),
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASSWORD,
},
},
from: process.env.SMTP_FROM,
}),
Providers.GitHub({
clientId: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET,
}),
Providers.Twitter({
clientId: process.env.TWITTER_CONSUMER_KEY,
clientSecret: process.env.TWITTER_CONSUMER_SECRET,
}),
],
adapter: Adapters.Prisma.Adapter({
prisma,
}),
secret: process.env.SECRET,
callbacks: {
session: async (session, user) => {
session.user.id = user.id;
session.user.createdAt = user.createdAt;
session.user.name = user.name;
return Promise.resolve(session);
},
},
}; Everything works fine for social auth + everything works fine for email auth when done on localhost. However whenever I try to log in with email on production deployment on vercel - the link sent to me is pointing to smth like:
While my actual |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After stumbling across this discussion I've checked my sendgrid domain settings + my dns provider settings(namecheap), there was some misconfiguration on that level. After I deleted everything and configured again it seems to be working! |
Beta Was this translation helpful? Give feedback.
After stumbling across this discussion I've checked my sendgrid domain settings + my dns provider settings(namecheap), there was some misconfiguration on that level. After I deleted everything and configured again it seems to be working!