I have a Nextjs application running on Firebase as a Cloud Function. I have this nodemailer function that works with a gmail App Password. The problem is that it is inside the code and I have to implement it as a secret.
let nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
const transporter = nodemailer.createTransport(
smtpTransport({
service: 'gmail',
auth: {
user: 'camilo@camiloengineer.com',
pass: 'MYPASSWORD'
},
})
);
I was able to send the key to the secrets manager, but I have no idea how to get this into code