Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter firebase sendSignInLinkToEmail not sending email and reporting any errors iOS

Hi I have followed these steps https://firebase.google.com/docs/dynamic-links/ios/receive and https://firebase.google.com/docs/auth/ios/email-link-auth#before_you_begin.

However when I come to run

FirebaseAuth.instance.sendSignInLinkToEmail(
                  email: "my email",
                  actionCodeSettings: ActionCodeSettings(
                    url: "https://myapp.firebaseapp.com",
                    iOS: {
                      "bundleId": "my bundleId"
                    },
                    android: {
                      "packageName": "mypackagename",
                      "installApp": true,
                      "minimumVersion": "21"
                    },
                    handleCodeInApp: true,

                  )
              )

However the no error occurs and no email is sent to my email address.

I have wasted 2.5 days of my life. Any suggestions will help, thanks.

like image 696
GILO Avatar asked Oct 23 '25 16:10

GILO


1 Answers

I was also facing the same issue yesterday and after multiple trials i found out that in ActionCodeSettings, url you're passing should be whitelisted in firebase sign-in method.

For example, if you've added domain name example.com in firebase sign-in method then url in ActionCodeSettings must have https://example.com/... and the rest paramter will be same as it is.

For whitelisting your domain, Go to Firebase Console > Authentication > Sign-in Method > Add domain click on add domain to whitelist your domain

like image 149
Vikram Pandit Avatar answered Oct 26 '25 07:10

Vikram Pandit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!