Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛] [🔥] sendPasswordResetEmail - auth/internal-error when url included #6838

Closed
2 of 10 tasks
mbaker3 opened this issue Jan 17, 2023 · 40 comments
Closed
2 of 10 tasks
Labels
help: needs-triage Issue needs additional investigation/triaging. Needs Attention plugin: authentication Firebase Authentication Stale type: bug New bug report

Comments

@mbaker3
Copy link

mbaker3 commented Jan 17, 2023

Issue

Currently having issues sending a password reset email when the continue URL is included. When a whitelisted URL is included in the actionCodeSettings object firebase returns an auth/internal-error. I haven't yet tried setting up dynamic links to see if the continue URL will work with a dynamic link vs a standard (whitelisted) url.

I'm hoping to be able to redirect to one of our own web pages once password reset is complete. I don't believe setting up dynamic links should be required but feel free to dismiss this bug if I've misinterpreted what firebase should support!

(This is in an Expo project using the custom dev client)

My usage is as follows

import auth, { FirebaseAuthTypes } from "@react-native-firebase/auth";
import * as Application from "expo-application";
// ...
auth()
   .sendPasswordResetEmail(email, {
      url: "https://my.whitelisted.url.com",
      handleCodeInApp: false,
      iOS: { bundleId: Application.applicationId! },
      android: {
        packageName: Application.applicationId!,
       installApp: true,
      },
    })
   .then(()=>console.log("success"))
   .catch((error) => console.error(error))

The error emitted:
[auth/internal-error] An internal error has occurred, please try again.


Project Files

Javascript

Click To Expand

package.json:

{
  "scripts": {
    "start": "npx expo start --dev-client",
    "prebuild-ios": "npx expo prebuild -p ios --clean",
    "local-build-ios": "eas build --platform ios --local --profile debug-simulator",
    "remote-build-debug-sim": "eas build --platform ios --profile debug-simulator",
    "remote-build-debug": "eas build --platform ios --profile debug",
    "remote-build-stage": "eas build --platform ios --profile stage",
    "remote-build-beta": "eas build --platform ios --profile beta",
    "publish-debug": "eas update --branch debug --message",
    "publish-stage": "expo publish --release-channel stage",
    "publish-beta": "expo publish --release-channel beta",
    "android": "npx expo run:android",
    "ios": "npx expo run:ios"
  },
  "dependencies": {
    "@logrocket/react-native": "^1.5.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-firebase/app": "^16.4.3",
    "@react-native-firebase/auth": "^16.4.3",
    "@react-native-firebase/crashlytics": "^16.4.3",
    "@react-native-firebase/firestore": "^16.4.3",
    "@react-native-firebase/functions": "^16.4.3",
    "@react-native-firebase/perf": "^16.4.3",
    "@react-native-google-signin/google-signin": "8.0.0",
    "@react-navigation/bottom-tabs": "^6.3.3",
    "@react-navigation/native": "^6.0.12",
    "@react-navigation/stack": "^6.2.3",
    "@types/lodash": "^4.14.185",
    "dayjs": "^1.11.5",
    "expo": "~46.0.19",
    "expo-app-loading": "~2.1.0",
    "expo-apple-authentication": "~4.3.0",
    "expo-build-properties": "~0.3.0",
    "expo-clipboard": "~3.1.0",
    "expo-dev-client": "~1.3.1",
    "expo-device": "~4.3.0",
    "expo-font": "~10.2.0",
    "expo-linking": "~3.2.4",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "expo-updates": "~0.14.7",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-date-picker": "^4.2.5",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-svg": "12.3.0",
    "react-native-uuid": "^2.0.1",
    "react-native-web": "~0.18.7",
    "system-ui": "^1.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.18.6",
    "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
    "@types/react": "~18.0.0",
    "@types/react-native": "~0.69.1",
    "@typescript-eslint/eslint-plugin": "^5.38.0",
    "@typescript-eslint/parser": "^5.38.0",
    "eslint": "^8.23.1",
    "eslint-config-universe": "^11.1.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "prettier": "^2.7.1",
    "react-native-svg-transformer": "^1.0.0",
    "typescript": "^4.6.3"
  },
  "resolutions": {
    "@logrocket/react-native/@expo/config-plugins": "^5.0.0"
  },
  "eslintConfig": {
    "extends": [
      "universe/native",
      "plugin:react-hooks/recommended"
    ],
    "rules": {
      "object-shorthand": "off",
      "react/jsx-boolean-value": "off"
    }
  },
  "private": true,
  "name": "some-app",
  "version": "1.0.0"
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")

require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}

platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
  :deterministic_uuids => false

target 'SomeApp' do
  use_expo_modules!
  config = use_native_modules!

  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Dir.pwd}/.."
  )

  # Uncomment to opt-in to using Flipper
  # Note that if you have use_frameworks! enabled, Flipper will not work
  #
  # if !ENV['CI']
  #   use_flipper!()
  # end

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    # This is necessary for Xcode 14, because it signs resource bundles by default
    # when building for devices.
    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|
      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
        resource_bundle_target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
  end

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
end

AppDelegate.m:

#import "AppDelegate.h"
// AUTO GENERATED START - DO NOT EDIT: Auto generated at build time by: withLocalNotification

#import <UserNotifications/UserNotifications.h>
#import "LocalNotification.h"
// AUTO GENRATED END - withLocalNotification
#import <Firebase/Firebase.h>

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
#import <React/RCTConvert.h>

#import <React/RCTAppSetupUtils.h>

#if RCT_NEW_ARCH_ENABLED
#import <React/CoreModulesPlugins.h>
#import <React/RCTCxxBridgeDelegate.h>
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
#import <React/RCTSurfacePresenter.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
#import <ReactCommon/RCTTurboModuleManager.h>

#import <react/config/ReactNativeConfig.h>

static NSString *const kRNConcurrentRoot = @"concurrentRoot";

@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
  RCTTurboModuleManager *_turboModuleManager;
  RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
  std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
  facebook::react::ContextContainer::Shared _contextContainer;
}
@end
#endif

@implementation AppDelegate
// AUTO GENERATED START - DO NOT EDIT: Auto generated at build time by: withLocalNotification
{
  UserNotificationDelegate *_notificationDelegate;
}
// AUTO GENRATED END - withLocalNotification

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// AUTO GENERATED START - DO NOT EDIT: Auto generated at build time by: withLocalNotification
  _notificationDelegate = [[UserNotificationDelegate alloc] init];
  [UNUserNotificationCenter currentNotificationCenter].delegate = _notificationDelegate;

// AUTO GENRATED END - withLocalNotification
  RCTAppSetupPrepareApp(application);

// @generated begin @react-native-firebase/app-didFinishLaunchingWithOptions - expo prebuild (DO NOT MODIFY) sync-ecd111c37e49fdd1ed6354203cd6b1e2a38cccda
[FIRApp configure];
// @generated end @react-native-firebase/app-didFinishLaunchingWithOptions
  RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];

#if RCT_NEW_ARCH_ENABLED
  _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
  _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
  _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
  _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
  bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
#endif

  NSDictionary *initProps = [self prepareInitialProps];
  UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:initProps];

  rootView.backgroundColor = [UIColor whiteColor];
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [self.reactDelegate createRootViewController];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  [super application:application didFinishLaunchingWithOptions:launchOptions];

  return YES;
}

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
  // If you'd like to export some custom RCTBridgeModules, add them here!
  return @[];
}

/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
- (BOOL)concurrentRootEnabled
{
  // Switch this bool to turn on and off the concurrent root
  return true;
}

- (NSDictionary *)prepareInitialProps
{
  NSMutableDictionary *initProps = [NSMutableDictionary new];
#if RCT_NEW_ARCH_ENABLED
  initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
#endif
  return initProps;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

// Linking API
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
}

// Universal Links
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
  BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
  return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
}

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
  return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
  return [super application:application didFailToRegisterForRemoteNotificationsWithError:error];
}

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
  return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

#if RCT_NEW_ARCH_ENABLED

#pragma mark - RCTCxxBridgeDelegate

- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
{
  _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
                                                             delegate:self
                                                            jsInvoker:bridge.jsCallInvoker];
  return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
}

#pragma mark RCTTurboModuleManagerDelegate

- (Class)getModuleClassFromName:(const char *)name
{
  return RCTCoreModulesClassProvider(name);
}

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
                                                      jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
{
  return nullptr;
}

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
                                                     initParams:
                                                         (const facebook::react::ObjCTurboModule::InitParams &)params
{
  return nullptr;
}

- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
{
  return RCTAppSetupDefaultModuleFromClass(moduleClass);
}

#endif

@end


Android

Not currently targeting with app.

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

info Fetching system and libraries information...
System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 170.20 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /var/folders/bh/46mx29x52bd3lxp94d1l0w1m0000gn/T/yarn--1673930127780-0.9800396747328977/node
    Yarn: 1.22.19 - /var/folders/bh/46mx29x52bd3lxp94d1l0w1m0000gn/T/yarn--1673930127780-0.9800396747328977/yarn
    npm: 8.19.1 - /usr/local/bin/npm
    Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 31
      Build Tools: 31.0.0, 32.0.0
      System Images: android-25 | Google APIs ARM EABI v7a, android-31 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.6 => 0.69.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
info React Native v0.71.0 is now available (your project is running on v0.69.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.71.0.
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.69.6.
info To upgrade, run "react-native upgrade".
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 16.4.3
    • 16.5.0
  • Firebase module(s) you're using that has the issue:
    • auth
  • Are you using TypeScript?
    • Y & 4.8.3
  • Expo verssion:
    • 46.0.19


@mbaker3 mbaker3 added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Jan 17, 2023
@BohdanKasian
Copy link

i have the same error, i use RN CLI(without Expo)

@ShaneZhengNZ
Copy link
Contributor

Save issue. This is kind of annoying. Not sure whether this is a Firebase issue or this library's issue.

@ShaneZhengNZ
Copy link
Contributor

I can replicate the issue with simple await auth().sendPasswordResetEmail(emailAddress);

@mbaker3
Copy link
Author

mbaker3 commented Jan 24, 2023

I can replicate the issue with simple await auth().sendPasswordResetEmail(emailAddress);

I haven't had this issue specifically. When sending just an email address, the request succeeds and I do get an email on the other end. For me, including the continueURL is what breaks the request.

@github-actions
Copy link

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Feb 21, 2023
@mbaker3
Copy link
Author

mbaker3 commented Feb 21, 2023

This issue still requires attention.

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Feb 21, 2023
@Nik9687
Copy link

Nik9687 commented Mar 3, 2023

This issue still requires attention.

+1 here, i have the same issue wen when i add the continueURL

@robnewton
Copy link

+1 here too. Same issue when I add the url option and once or twice even when I don't add it. I wondered if it is related to a rate limit from calling it multiple times in a row during testing, but I waited a few hours and it's still an issue.

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Apr 3, 2023
@mbaker3
Copy link
Author

mbaker3 commented Apr 3, 2023

This issue still requires attention.

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Apr 3, 2023
@robnewton
Copy link

Also here still need attention

@warloff
Copy link

warloff commented Apr 26, 2023

This still requires attention and better documentation on the use of sendPasswordResetEmail

@github-actions
Copy link

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label May 24, 2023
@mbaker3
Copy link
Author

mbaker3 commented May 24, 2023

This issue still requires attention.

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label May 24, 2023
@github-actions
Copy link

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Jun 21, 2023
@mbaker3
Copy link
Author

mbaker3 commented Jun 21, 2023

This issue still requires attention.

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Jun 21, 2023
@vbarda
Copy link

vbarda commented Jul 4, 2023

+1, also running into the same issue when including URL

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Aug 1, 2023
@mbaker3
Copy link
Author

mbaker3 commented Aug 2, 2023

This issue still requires attention.

@github-actions github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Sep 27, 2023
@mbaker3
Copy link
Author

mbaker3 commented Sep 27, 2023

This issue still requires attention. It's worked its way far enough up my backlog that I'll probably investigate the source myself in the next few months.

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Sep 27, 2023
@mrtawil
Copy link

mrtawil commented Oct 12, 2023

Hello @mbaker3, did you try enabling dynamic links in Firebase project?

@mbaker3
Copy link
Author

mbaker3 commented Oct 12, 2023

I haven't, as far as I understand it shouldn't be required if the URL is whitelisted. I had planned to test out Dynamic Links but I'm a bit hesitant to invest the effort since it's being deprecated in the future anyway.
I'll see what I can do when I jump back on this bug in a couple of months.

@opsb
Copy link

opsb commented Oct 13, 2023

Same problem with the dart api, including a url with a whitelisted domain throw an internal error exception.

@mrtawil
Copy link

mrtawil commented Oct 13, 2023

Hello @mbaker3, did you try enabling dynamic links in Firebase project?

I am using the following code:

user.sendEmailVerification({
  handleCodeInApp: true,
  url: `https://${Config.APP_SHARE_HOST}?mode=verifyEmail`,
});

On Android the email was sent successfully without any issues, and here is the result:

image

While on iOS it was failing, I have read in another thread that enabling dynamic links in Firebase console will fix this and it did in my case. As you can see in the following link, the URL is generated from dynamic links in iOS case:

image

@mbaker3
Copy link
Author

mbaker3 commented Oct 13, 2023

Hmmm, interesting. Requiring DynamicLinks makes sense in your case because you're asking to handle the flow in your app with handleCodeInApp: true.

We want to rely on the web flow to handle our reset so we have handleCodeInApp: false. However looking at the docs on the parameters again I noticed that it's expecting a Universal link for the url param...

This URL represents the state/Continue URL in the form of a universal link. This URL can should be constructed as a universal link that would either directly open the app where the action code would be handled or continue to the app after the action code is handled by Firebase.

I'm not sure how I missed that on first pass but it seems a regular URL was never expected to work?!

If that's the case then this my original report on this issue is not a bug. Leaving this issue open until I verify that constructing a universal link does in fact work.

Copy link

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Nov 10, 2023
@opsb
Copy link

opsb commented Nov 13, 2023

This appears to be a documentation issue. Support got back to me and told me that you have to use dynamic links, it won't work without them currently.

@mikehardy
Copy link
Collaborator

I did not know that! Very interesting given dynamic-links is deprecated+sunsetting but I suppose if it's a requirement now it's a requirement. If there is any place in our documentation on rnfirebase.io that you notice related to this which would be improved by noting the dynamic-links as a strict requirement, there's an edit button top right of every page (even the types pages built off typescript - they are turned into the docs site dynamically after merging an edit)

@github-actions github-actions bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Nov 13, 2023
Copy link

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 github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Dec 11, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2023
@jczekalski
Copy link

Hey @opsb @mikehardy, I'm currently switching from the JS Firebase SKD to React Native Firebase and I've also run into this issue on iOS, but with email verification:

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

sendEmailVerification(user, { url: "https://example.com" })

This definitely works with the JS SDK. It can be a regular url and with universal links configured on iOS, it will correctly deep link into the app if the user opens the email on their phone and taps "Continue". With React Native Firebase I get the auth/internal-error error when calling sendEmailVerification with the url param. I don't have Dynamic Links configured in the project since, as you mentioned, they're deprecated. Should this issue be reopened in that case?

@mikehardy mikehardy reopened this Oct 27, 2024
@mikehardy mikehardy added plugin: authentication Firebase Authentication Needs Attention and removed Type: Stale Issue has become stale - automatically added by Stale bot labels Oct 27, 2024
@mikehardy
Copy link
Collaborator

Reopening, sure. Have you tried configuring dynamic links? May still be a requirement for the URL param? With apologies I'm mobile right now and haven't reanalyzed this issue deeply at all

@jczekalski
Copy link

jczekalski commented Oct 28, 2024

The thing is I'd rather not configure or use dynamic links since they're deprecated. Based on the Firebase web docs, the only requirement is to:

  • specify the continue url, i.e. sendEmailVerification(user, { url: "https://example.com" })
  • whitelist the domain in the Firebase Console

With the other params being optional, this was enough to get it working with the JS Firebase SDK. I don't have dynamic links configured and I'm not specifying the dynamicLinkDomain or any other params. With the JS SDK the url in the verification email received by the user looks like this:

https://my-app.firebaseapp.com/__/auth/action?mode=verifyEmail&oobCode=xyz&apiKey=xyz&continueUrl=https%3A%2F%2Fwww.example.com&lang=en

So I think it's just passing a regular url via params and with universal links configured on iOS opening the continueUrl in the browser on the mobile device should deep link into the app. The native iOS docs look really similar when it comes to these params, but perhaps there is some difference between web and mobile or this is indeed tied to dynamic links in some way that I'm missing.

Copy link

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 github-actions bot added the Stale label Nov 25, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
@HannahCarney
Copy link

This is still an issue and setting up Dynamic links is obviously not a possibility since it's fully deprecated in 5 months time - I've searched everywhere for a solution that does not require this, and cannot seem to find any.

@mikehardy
Copy link
Collaborator

@guilhermehrcosta
Copy link

It's possible disable dynamic link when sendPasswordReset email? The dynamic link's is deprecated and not still work in aug 2025.

@mikehardy
Copy link
Collaborator

@guilhermehrcosta please read my comment just above yours, but very very carefully. Your concern is specifically addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: needs-triage Issue needs additional investigation/triaging. Needs Attention plugin: authentication Firebase Authentication Stale type: bug New bug report
Projects
None yet
Development

No branches or pull requests