@react-native-firebase/auth 16.0.0 → 16.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
### [16.1.1](https://github.com/invertase/react-native-firebase/compare/v16.1.0...v16.1.1) (2022-10-21)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @react-native-firebase/auth
|
9
|
+
|
10
|
+
## [16.1.0](https://github.com/invertase/react-native-firebase/compare/v16.0.0...v16.1.0) (2022-10-20)
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
- **auth, emulator:** guard against double useEmulator calls ([13402d5](https://github.com/invertase/react-native-firebase/commit/13402d5a7804f9a68d09903a2616e25ab95cb67a))
|
15
|
+
|
6
16
|
## [16.0.0](https://github.com/invertase/react-native-firebase/compare/v15.7.1...v16.0.0) (2022-10-19)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @react-native-firebase/auth
|
@@ -75,6 +75,7 @@ class ReactNativeFirebaseAuthModule extends ReactNativeFirebaseModule {
|
|
75
75
|
private static final String TAG = "Auth";
|
76
76
|
private static HashMap<String, FirebaseAuth.AuthStateListener> mAuthListeners = new HashMap<>();
|
77
77
|
private static HashMap<String, FirebaseAuth.IdTokenListener> mIdTokenListeners = new HashMap<>();
|
78
|
+
private static HashMap<String, String> emulatorConfigs = new HashMap<>();
|
78
79
|
private String mVerificationId;
|
79
80
|
private String mLastPhoneNumber;
|
80
81
|
private PhoneAuthProvider.ForceResendingToken mForceResendingToken;
|
@@ -1561,10 +1562,13 @@ class ReactNativeFirebaseAuthModule extends ReactNativeFirebaseModule {
|
|
1561
1562
|
|
1562
1563
|
@ReactMethod
|
1563
1564
|
public void useEmulator(String appName, String host, int port) {
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1565
|
+
|
1566
|
+
if (emulatorConfigs.get(appName) == null) {
|
1567
|
+
emulatorConfigs.put(appName, "true");
|
1568
|
+
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
|
1569
|
+
FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(firebaseApp);
|
1570
|
+
firebaseAuth.useEmulator(host, port);
|
1571
|
+
}
|
1568
1572
|
}
|
1569
1573
|
|
1570
1574
|
/* ------------------
|
@@ -50,6 +50,7 @@ static NSString *const PHONE_AUTH_STATE_CHANGED_EVENT = @"phone_auth_state_chang
|
|
50
50
|
|
51
51
|
static __strong NSMutableDictionary *authStateHandlers;
|
52
52
|
static __strong NSMutableDictionary *idTokenHandlers;
|
53
|
+
static __strong NSMutableDictionary *emulatorConfigs;
|
53
54
|
// Used for caching credentials between method calls.
|
54
55
|
static __strong NSMutableDictionary<NSString *, FIRAuthCredential *> *credentials;
|
55
56
|
|
@@ -69,6 +70,7 @@ RCT_EXPORT_MODULE();
|
|
69
70
|
dispatch_once(&onceToken, ^{
|
70
71
|
authStateHandlers = [[NSMutableDictionary alloc] init];
|
71
72
|
idTokenHandlers = [[NSMutableDictionary alloc] init];
|
73
|
+
emulatorConfigs = [[NSMutableDictionary alloc] init];
|
72
74
|
credentials = [[NSMutableDictionary alloc] init];
|
73
75
|
});
|
74
76
|
return self;
|
@@ -940,7 +942,10 @@ RCT_EXPORT_METHOD(useEmulator
|
|
940
942
|
: (FIRApp *)firebaseApp
|
941
943
|
: (nonnull NSString *)host
|
942
944
|
: (NSInteger)port) {
|
943
|
-
[
|
945
|
+
if (!emulatorConfigs[firebaseApp.name]) {
|
946
|
+
[[FIRAuth authWithApp:firebaseApp] useEmulatorWithHost:host port:port];
|
947
|
+
emulatorConfigs[firebaseApp.name] = @YES;
|
948
|
+
}
|
944
949
|
}
|
945
950
|
|
946
951
|
- (FIRAuthCredential *)getCredentialForProvider:(NSString *)provider
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '16.
|
2
|
+
module.exports = '16.1.1';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/auth",
|
3
|
-
"version": "16.
|
3
|
+
"version": "16.1.1",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.",
|
6
6
|
"main": "lib/index.js",
|
@@ -22,10 +22,10 @@
|
|
22
22
|
"auth"
|
23
23
|
],
|
24
24
|
"peerDependencies": {
|
25
|
-
"@react-native-firebase/app": "16.
|
25
|
+
"@react-native-firebase/app": "16.1.1"
|
26
26
|
},
|
27
27
|
"publishConfig": {
|
28
28
|
"access": "public"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "a3fc79423f0e2aa9303d01658c3a332abe957e40"
|
31
31
|
}
|