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).
Related
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
I'm using Firebase sendSignInWithEmailLink with the url generated as part of the Firebase dynamic link.
The firebase dynamic url looks like:
e.g: https://myapp.page.link/H1c4
The url from step 1 is sent as part of sendSignInWithEmailLink
User received email and clicks on the verification link.
At the end of redirection I can see that the url contains the oobCode as shown below:
https://myapp.page.link/H1c4?apiKey=&oobCode=YG2N2eLU4qGBsDeLU5cVsDrzF9qwkGzoUepInuA9pm0AAAFtfk41Nw&mode=signIn&lang=en
When my app receives the dynamic link finally, it is loosing the oobCode. My app gets
https://myapp.page.link/uEOBUnv1k4XclzwfsT5NXnGBgAA3/
The part after link/ is a custom data which I used while generating the link in step 1.
When I use isSignInWithEmailLink for validating the link in step 5, I get the result as FALSE indicating it's not a valid email link.
But if I provide the full URL from step 4 in the code(manually), the isSignInWithEmailLink returns TRUE.
I think I've done all required but Firebase dynamic link is not persisting the oobCode as part of the link sent to the app on the device.
Has anyone seen this and know what could be the problem? keen to get feedback here before reporting as an issue in Github.
Cheers
Are you using a custom dynamic link with a path, eg. https://myapp.page.link/H1c4? If so, that is currently not supported with Firebase Auth. Only custom domains with no paths are supported, eg. https://myapp.page.link.
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
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
Does anyone know if Firebase has the functionality for me to email a user with a yes/no question which in turn offers two links, if one of those links are clicked it then changes a specific value on a node in the database?
In my mind I would use a firebase function to email the user when a certain trigger occurs, and the body of that email would be a template where upon the two links can be added as needed.
I have been searching online but either am using the wrong key words or the functionality does not exist..
Yes, you can do this with Cloud Functions for Firebase. Essentially you would want to have two functions: one that sends the email and one that handles the links in the email.
If I were building it, I'd probably generate a secret token when I sent the email and store it along-side the question's data. In the email template, I'd then have the yes/no buttons point to my function URL like:
https://us-central1-myproject.cloudfunctions.net/respond?answer=yes&token={the_generated_token}
I'd then parse the answer and token from the query string in my respond function, verify that the secret token matches, and if so record the response. Once the response was recorded, I'd invalidate the secret token somehow so it could only be used once.