Firebase Cloud Functions: Send Email via Authentication System - firebase

Firebase Authentication has a built in email service. Is it possible to fire an auth based email via Cloud Functions (admin js sdk)?
Seems like I should be able to trigger an email from noreply#my-domain.com with a custom oob code which I could then use to drive my (client-side) application.
My use case would be, when a new order .collection("orders").doc(uid) has its stage field updated/changed to 'submitted' I would like to notify a user via email that a new order is submitted. Maybe even use the oob code to mark as 'processed'?
...just trying to avoid using a 3rd party email service altogether.

you can use MailChimp to do what you are asking, since like Miles says, you will need to do a workaround in order to fix this.
I have been using MailChimp my self to send emails to each user registered in my app , i have setup a couple of emails in mailchimp and i just add to the list all the users that register to my app, so the first message will be the welcome message, then after 2 days another email and so on, you can trigger an email whenever you want, since the doc is not that clear i have made a tutorial on how to integrate it with Android.
you can find that tutorial HERE , the only thing is that is in spanish, sorry.
The idea is simple, just get your users email throught FirebaseAuth , pass that email to the mailchimp query , and then setup an email from the mailchimp website

Unfortunately, their API does not appear to support emailing users in your project. However, they have sample code for cloudfunctions to email users you can easily tweak for your needs: https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users

Related

Mailchimp + Firebase - subscribe to newsletter

I am using Mailchimp and Firebase to send automated emails.
I have installed the extension and it using Firebase Console, but for Contact Status option I chose 'Pending'.
The thing is, I dont want every user that creates an account to be subscribed to the audiance, I want it to be 'Subscribed' just if he subscribes to the newsletter (it should happen on a click event on a button). I have also set up an automated email in Mailchimp (that is triggered immediately after subscribed contacts join your audience).
Do you know how can I achieve this? I don't have any written code yet, because I don't know where to begin with this.

alternative to sending email using gmail with firebase function

I recently got that email from Google which says that as the beginning of 30.05.2022, we will not be able to use "less secure apps" options anymore.
I'm using this option to sending emails with firebase function combined with nodemailer, as probably a lot of other users do.
So the question that I have is how can we use it after the above date?
If you need an example of how I am using it please let me know in the comment.
You may use the Google App Password to replace your current password set inside your nodemailer function
Google App Password will generate 16-digit passcode for your third party app
https://support.google.com/mail/answer/185833?hl=en-GB

Firebase or firebase+paypal paid only accounts

I'm trying to set up user accounts for my website which are paid only. I don't want a user to have an option to create an account without having already paid. How would I go about this?
Example:
google pay button with a click subscribe simultaneously adding them on a subscription and creating their account (not sure how I would do this integration)
Paypal subscribe button which then takes them to a page where they can sign up after they pay (not sure how I would get their paypal subscription information though on that response if they don't choose to sign up)
I did find paypal subscriptions that generate usernames and passwords (https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/user-names-passwords/), however I dont know how I would correlate this with my firebase users.
I'd prefer a solution where after they subscribe they are automatically added to google firebase with an email and password (or temp password) and their paypal ID.
Use firebase functions and require they initiate a subscription with paypal buttons and onApprove of the paypal buttons, send an API call to your google function to add them to the database and send the sign up email.

Flutter: Sending Email Verification code through FlutterFire?

In the FlutteFire documentation, it says that "Firebase will send an automated email to the user with a unique code. This code can then be entered via the applyActionCode() method. You can first check whether the code is valid by using the checkActionCode() method" Yet when I send an email verification, it shows a link.
In my email template on Firebase console, it is still showing an email link.
I want to be able to send a code instead, just because it allows for a better user experience in my opinion. What do I do in order to get the email verification to send a code instead? I've looked everywhere and can't find anything helpful.
At the time of writing, you cannot extract the oobCode value that is generated by Firebase Auth.
If you want to use this code, you need to extract it from the Query String in the web page that corresponds to this URL (note that you can adapt the URL in the template in order it points to another URL that you control, e.g. that is exposed by your app).

Problem with Google Calendar Api error This app isn't verified

I am creating a project to be able to share a Calendar among some users.
The strange thing is that when one of the users wants to connect, the following error appears telling him "This app isn't verified"
https://prnt.sc/p87wvm
I am not a programmer so it is difficult for me but I think I am doing everything right.
The only api that I am using is that of Google Calendar.
The email with which I am creating the Api is a #gmail.com
https://prnt.sc/p88o0g
I am not using any special scope that requires some type of verification.
I did not exceed any quota limit or anything like that.
And the send to verification button is disabled and tells me that my changes do not require verification
I want any user with a Gmail email to connect to the calendar
What i need to do??
For the doubts I have verified the domain thinking that it was that but it did not solve the problem either

Resources