Hi, I found a little problem with Firebase Emulator (Android & iOS environment).
Description of the problem:
Problem occurs only if you want to test your code on Emulator Enviroment. Example: You want to log in with phone, but Firebase Emulator supporting phone validation, but PhoneNumberProvider.swift or PhoneProviderHandler.java ignoring Emulator from AngularFire set in JS (typescript).
Hotfix:
iOS
Implement custom auth on ...Provider.swift or in Plugin.swift file Auth.auth().useEmulator(withHost:"localhost", port:9099) in signIn(call: ...) method.
Run only if app building with Debug configuration in Xcode scheme. In production version app does not run the code in #if statement.
Implement custom auth on ...ProviderHandler.java or in CapacitorFirebaseAuth.java file FirebaseAuth.getInstance().useEmulator("10.5.130.140", 9099) in signIn(call: ...) method. Adress cannot be localhost/127.0.0.1, must be machine local IP!
Second step need for work success also change file node_modules/capacitor-firebase-auth/android/build.gradleline~50 from implementation 'com.google.firebase:firebase-auth:19.3.1' to implementation 'com.google.firebase:firebase-auth:21.0.1' and then sync Gradle files. Version 19.3.1 not support tra emulator with method and need many more steps for override native function.
Run only if app building with Debug configuration in Xcode scheme. In production version app does not run the code in #if statement.
Hi, I found a little problem with Firebase Emulator (Android & iOS environment).
Description of the problem:
Problem occurs only if you want to test your code on Emulator Enviroment. Example: You want to log in with phone, but Firebase Emulator supporting phone validation, but
PhoneNumberProvider.swift
orPhoneProviderHandler.java
ignoring Emulator from AngularFire set in JS (typescript).Hotfix:
iOS
Implement custom auth on
...Provider.swift
or inPlugin.swift
fileAuth.auth().useEmulator(withHost:"localhost", port:9099)
insignIn(call: ...)
method.Run only if app building with Debug configuration in Xcode scheme. In production version app does not run the code in
#if
statement.Android
Implement custom auth on
...ProviderHandler.java
or inCapacitorFirebaseAuth.java
fileFirebaseAuth.getInstance().useEmulator("10.5.130.140", 9099)
insignIn(call: ...)
method. Adress cannot be localhost/127.0.0.1, must be machine local IP!Run only if app building with Debug configuration in Xcode scheme. In production version app does not run the code in
#if
statement.