Additional Arguments for EmailProvider
Unanswered
Munchkin posted this in #help-forum
MunchkinOP
I want to pass and receive an additional argument between the signIn method and the emailProvider to customise the link sent to the client, including integrating language preferences. Are there any solutions for this? And any idea how to integrate the language into the url after?
I did try this way but it the logs does not show the language. Also, adding a language such as "fr" at the callbackUrl does not work as well.
Thanks
I did try this way but it the logs does not show the language. Also, adding a language such as "fr" at the callbackUrl does not work as well.
Thanks
// fileA
let response = await signIn(
'email',
{
redirect: false,
email: email,
callbackUrl: '/',
},
{ language: "fr" },
);
// [...nextAauth]
EmailProvider({
server: {
host: process.env.EMAIL_SERVER_HOST,
port: process.env.EMAIL_SERVER_PORT,
auth: {
user: process.env.EMAIL_SERVER_USER,
pass: process.env.EMAIL_SERVER_PASSWORD,
},
},
from: process.env.EMAIL_FROM,
//@ts-ignore
async sendVerificationRequest(params) { console.log(params);
}
});