Screenshot of Firebase Cloud Functions Console Log
I have an app published on the Google Play store, which I built while learning android/firebase. I was a total newbie.
I added cloud functions that performed tasks like sending welcome emails to new users. However, while deploying the cloud functions/app, I was asked my gmail e-mail & password on the command line. I submitted them. However, I have changed my gmail password now & Google does not allow me to use old passwords again. So, my app fails to execute those cloud functions now due to authentication errors. The error log screenshot is attached.
How can I specify my new credentials so as to make my published app work normal again?
I could not find anything relevant or an option on the Firebase console for this. What best practices should be followed so that I don't get stuck like this in the future & can freely change passwords for developer accounts & not affect my apps?
Edit:
Here's the text from the screenshot:
sendWelcomeEmail Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials q187-v6sm4997775iof.67 - gsmtp at SMTPConnection._formatError (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:591:19) at SMTPConnection._actionAUTHComplete (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1320:34) at SMTPConnection._responseActions.push.str (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:356:26) at SMTPConnection._processResponse (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:747:20) at SMTPConnection._onData (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:543:14) at TLSSocket._socket.on.chunk (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:495:47) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at TLSSocket.Readable.push (_stream_readable.js:134:10)
Here the function for sending emails via nodemailer:
// Sends a welcome email to the given user.
function sendWelcomeEmail(email, displayName) {
const mailOptions = {
from: `noreply@example.com`,
to: email
};
mailOptions.subject = `Welcome to ${APP_NAME}!`;
mailOptions.text = `Hey ${displayName || ''},\n\nWelcome to ${APP_NAME}!...........`;
return mailTransport.sendMail(mailOptions).then(() => {
console.log('New welcome email sent to:', email);
});
}