Is there a way to prompt the Google sign in to the user when sending mail with NodeMailer and OAuth 2.0?

Viewed 49

In a website project, I was tasked to add website functionality to allow the business owner to e-mail clients who have filled up the "contact us" form.

In the process I followed, I used OAuth 2.0 to authenticate g-mail account in sending e-mail with Nodemailer, in the OAuth 2.0 Playground, the Step 1 allows me as the developer to Select and Authorize mail.google.com which leads me to a consent screen to sign in the Google account to use as the mail sender.

After that, I successfully used my own g-mail account to send an e-mail through a contact form.

But since I am not going to be the end-user of this website, I want to let my client to be able to sign in their own Google account by themselves. Like if they click the send button, the same Google sign in consent form would appear for them so they could use their Google account in sending the e-mail.

I do not think I would be able to get their Google account to sign it in on the OAuth 2.0 Playground.

This was the guide I was following.

0 Answers
Related