@react-native-firebase/auth 14.4.0 → 14.6.0

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,22 @@
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
+ # [14.6.0](https://github.com/invertase/react-native-firebase/compare/v14.5.1...v14.6.0) (2022-03-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **auth:** allow emulator hostnames to contain hyphens ([#6141](https://github.com/invertase/react-native-firebase/issues/6141)) ([98eb1ce](https://github.com/invertase/react-native-firebase/commit/98eb1ce3663bb0c0c507f7e8129ad094a53898b5))
11
+
12
+ ## [14.5.1](https://github.com/invertase/react-native-firebase/compare/v14.5.0...v14.5.1) (2022-03-05)
13
+
14
+ **Note:** Version bump only for package @react-native-firebase/auth
15
+
16
+ # [14.5.0](https://github.com/invertase/react-native-firebase/compare/v14.4.0...v14.5.0) (2022-02-15)
17
+
18
+ ### Features
19
+
20
+ - **auth, ios:** Add support for Facebook Limited Login ([#6073](https://github.com/invertase/react-native-firebase/issues/6073)) ([f681cc5](https://github.com/invertase/react-native-firebase/commit/f681cc5a5b493033faef1f6ea64d9f5a40e6d9d4))
21
+
6
22
  # [14.4.0](https://github.com/invertase/react-native-firebase/compare/v14.3.3...v14.4.0) (2022-02-13)
7
23
 
8
24
  ### Features
@@ -42,6 +42,11 @@ describe('Auth', function () {
42
42
  const bar = auth().useEmulator('http://127.0.0.1:9099');
43
43
  expect(bar).toEqual(['10.0.2.2', 9099]);
44
44
  });
45
+
46
+ it('useEmulator allows hyphens in the hostname', function () {
47
+ const result = auth().useEmulator('http://my-host:9099');
48
+ expect(result).toEqual(['my-host', 9099]);
49
+ });
45
50
  });
46
51
 
47
52
  describe('tenantId', function () {
@@ -953,6 +953,11 @@ RCT_EXPORT_METHOD(useEmulator
953
953
  credential = credentials[authToken];
954
954
  } else if ([provider compare:@"twitter.com" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
955
955
  credential = [FIRTwitterAuthProvider credentialWithToken:authToken secret:authTokenSecret];
956
+ } else if ([provider compare:@"facebook.com" options:NSCaseInsensitiveSearch] == NSOrderedSame &&
957
+ ![authTokenSecret isEqualToString:@""]) {
958
+ credential = [FIROAuthProvider credentialWithProviderID:provider
959
+ IDToken:authToken
960
+ rawNonce:authTokenSecret];
956
961
  } else if ([provider compare:@"facebook.com" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
957
962
  credential = [FIRFacebookAuthProvider credentialWithAccessToken:authToken];
958
963
  } else if ([provider compare:@"google.com" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
package/lib/index.js CHANGED
@@ -381,7 +381,7 @@ class FirebaseAuthModule extends FirebaseModule {
381
381
  }
382
382
 
383
383
  // Native calls take the host and port split out
384
- const hostPortRegex = /^http:\/\/([\w\d.]+):(\d+)$/;
384
+ const hostPortRegex = /^http:\/\/([\w\d-.]+):(\d+)$/;
385
385
  const urlMatches = _url.match(hostPortRegex);
386
386
  if (!urlMatches) {
387
387
  throw new Error('firebase.auth().useEmulator() unable to parse host and port from URL');
@@ -26,10 +26,10 @@ export default class FacebookAuthProvider {
26
26
  return providerId;
27
27
  }
28
28
 
29
- static credential(token) {
29
+ static credential(token, secret = '') {
30
30
  return {
31
31
  token,
32
- secret: '',
32
+ secret,
33
33
  providerId,
34
34
  };
35
35
  }
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- module.exports = '14.4.0';
2
+ module.exports = '14.6.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/auth",
3
- "version": "14.4.0",
3
+ "version": "14.6.0",
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": "14.4.0"
25
+ "@react-native-firebase/app": "14.6.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "a21797813bdac784232b0275f112d7f1524eb222"
30
+ "gitHead": "0d0f0d1f839af2a3343c8a0edb08d7749623d4de"
31
31
  }