react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

[iOS] sendEmailVerification fails to send email when ActionCodeSettings URL is provided - works on Android

Open nustony opened this issue 5 months ago • 8 comments

Issue

I'm experiencing an issue with sendEmailVerification on iOS where emails are not sent when ActionCodeSettings with a URL is provided, while the same code works perfectly on Android.

Current Behavior

  • iOS: When ActionCodeSettings with url parameter is provided → Email is NOT sent
  • iOS: When ActionCodeSettings is omitted → Email is sent successfully (but without continue button)
  • Android: Works perfectly with ActionCodeSettings and URL parameter

Expected Behavior

Email verification should be sent on both iOS and Android when ActionCodeSettings with URL is provided.

Code Sample

import { sendEmailVerification } from '@react-native-firebase/auth';

const actionCodeSettings = {
  url: 'https://xxx.xxx/email-verification',
  handleCodeInApp: true,
  iOS: {
    bundleId: 'com.xxx.app'
  },
  android: {
    packageName: 'com.xxx.appl',
    installApp: true,
    minimumVersion: '12'
  }
};

// This works on Android but fails silently on iOS (no email sent)
await sendEmailVerification(user, actionCodeSettings);

// This works on iOS but email has no continue button
await sendEmailVerification(user);

Configuration

Info.plist (iOS):

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>https://xxx.app</string>
    </array>
  </dict>
</array>

<key>com.apple.developer.associated-domains</key>
<array>
  <string>applinks:xxx.xxx</string>
</array>

Firebase Console:

  • Domain xxx.xxx is added to Authorized domains
  • iOS app is properly configured with correct Bundle ID

Environment

  • Platform: iOS (tested on iOS simulator and physical device)
  • react-native-firebase version: [your version]
  • React Native version: [your version]
  • iOS version: [your iOS version]
  • Firebase SDK version: [your version]

Additional Notes

This appears to be the same issue as #3364 from 2020, but that issue was marked as stale. The problem still persists in current versions.

Question

Is there a proper solution to make sendEmailVerification work with ActionCodeSettings URL on iOS, or is the platform-specific workaround the only viable solution?

nustony avatar Sep 04 '25 09:09 nustony

Hi there, can you confirm its not appearing in the spam folder? Also do you get any errors when doing this on iOS or on gcp? Also what kind of account are you trying to verify email for?

MichaelVerdon avatar Sep 10 '25 11:09 MichaelVerdon

Hi there, can you confirm its not appearing in the spam folder? Also do you get any errors when doing this on iOS or on gcp? Also what kind of account are you trying to verify email for?

I get the error right when calling the send mail function, so the email is never sent. For testing, I used a Yopmail account.

nustony avatar Sep 15 '25 01:09 nustony

Hi there, can you please tell me if the solution here works? https://stackoverflow.com/questions/51178015/firebase-email-verification-not-working-with-actioncodesetting

MichaelVerdon avatar Sep 16 '25 10:09 MichaelVerdon

Same here. Any update?

napoleon-na avatar Nov 03 '25 13:11 napoleon-na

@napoleon-na if you are reading through the comments here it appears we have an open request for feedback. Did you see that? Did you try it? How did it go?

Hi there, can you please tell me if the solution here works? https://stackoverflow.com/questions/51178015/firebase-email-verification-not-working-with-actioncodesetting

mikehardy avatar Nov 03 '25 13:11 mikehardy

@mikehardy Yeah, I checked the link post. But it's not the same as my experienced. In my case, I got an error when call verifyBeforeUpdateEmail so that email is never sent.

Actually, I realized this after posting - the library I was using wasn't for React Native, but for Flutter. 😅 However, since the exact same issue occurred, I suspect the root cause might be similar.

napoleon-na avatar Nov 03 '25 13:11 napoleon-na

Okay, going to resolve those comments as not actionable in this repo since not react-native-firebase, and reproduction details are unclear.

mikehardy avatar Nov 03 '25 13:11 mikehardy

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Dec 01 '25 13:12 github-actions[bot]