32 lines
777 B
JavaScript
32 lines
777 B
JavaScript
/**
|
|
* NextAuth email provider configuration for PEDW.
|
|
*
|
|
* PEDW supplies its own sendVerificationRequest implementation using
|
|
* GOV.UK Notify, so the default Nodemailer SMTP sender is unnecessary.
|
|
*
|
|
* Preserve the NextAuth v4 email provider configuration contract.
|
|
*/
|
|
const EmailProvider = (options = {}) => ({
|
|
id: "email",
|
|
type: "email",
|
|
name: "Email",
|
|
server: {
|
|
host: "localhost",
|
|
port: 25,
|
|
auth: {
|
|
user: "",
|
|
pass: ""
|
|
}
|
|
},
|
|
from: "NextAuth <no-reply@example.com>",
|
|
maxAge: 24 * 60 * 60,
|
|
async sendVerificationRequest() {
|
|
throw new Error(
|
|
"PEDW requires a custom GOV.UK Notify verification sender"
|
|
);
|
|
},
|
|
options
|
|
});
|
|
|
|
export default EmailProvider;
|