@react-native-firebase/auth 18.1.0 → 18.3.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,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
|
+
## [18.3.0](https://github.com/invertase/react-native-firebase/compare/v18.2.0...v18.3.0) (2023-07-19)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
- **auth, revokeToken:** sign in with apple revokeToken API ([#7239](https://github.com/invertase/react-native-firebase/issues/7239)) ([2b9dc73](https://github.com/invertase/react-native-firebase/commit/2b9dc738259b200d47c79cc028becf691cb528d3))
|
11
|
+
|
12
|
+
## [18.2.0](https://github.com/invertase/react-native-firebase/compare/v18.1.0...v18.2.0) (2023-07-13)
|
13
|
+
|
14
|
+
**Note:** Version bump only for package @react-native-firebase/auth
|
15
|
+
|
6
16
|
## [18.1.0](https://github.com/invertase/react-native-firebase/compare/v18.0.0...v18.1.0) (2023-06-22)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @react-native-firebase/auth
|
@@ -450,6 +450,21 @@ class ReactNativeFirebaseAuthModule extends ReactNativeFirebaseModule {
|
|
450
450
|
});
|
451
451
|
}
|
452
452
|
|
453
|
+
/**
|
454
|
+
* revokeToken
|
455
|
+
*
|
456
|
+
* @param authorizationCode
|
457
|
+
* @param promise
|
458
|
+
*/
|
459
|
+
@ReactMethod
|
460
|
+
public void revokeToken(String appName, final String authorizationCode, final Promise promise) {
|
461
|
+
Log.d(TAG, "revokeToken");
|
462
|
+
|
463
|
+
// Revocation is not implemented on Android
|
464
|
+
Log.e(TAG, "revokeToken:failure:noCurrentUser");
|
465
|
+
promiseNoUser(promise, false);
|
466
|
+
}
|
467
|
+
|
453
468
|
/**
|
454
469
|
* sendPasswordResetEmail
|
455
470
|
*
|
@@ -663,6 +663,22 @@ RCT_EXPORT_METHOD(checkActionCode
|
|
663
663
|
}];
|
664
664
|
}
|
665
665
|
|
666
|
+
RCT_EXPORT_METHOD(revokeToken
|
667
|
+
: (FIRApp *)firebaseApp
|
668
|
+
: (NSString *)authorizationCode
|
669
|
+
: (RCTPromiseResolveBlock)resolve
|
670
|
+
: (RCTPromiseRejectBlock)reject) {
|
671
|
+
[[FIRAuth authWithApp:firebaseApp]
|
672
|
+
revokeTokenWithAuthorizationCode:authorizationCode
|
673
|
+
completion:^(NSError *_Nullable error) {
|
674
|
+
if (error) {
|
675
|
+
[self promiseRejectAuthException:reject error:error];
|
676
|
+
} else {
|
677
|
+
[self promiseNoUser:resolve rejecter:reject isError:NO];
|
678
|
+
}
|
679
|
+
}];
|
680
|
+
}
|
681
|
+
|
666
682
|
RCT_EXPORT_METHOD(sendPasswordResetEmail
|
667
683
|
: (FIRApp *)firebaseApp
|
668
684
|
: (NSString *)email
|
package/lib/index.d.ts
CHANGED
@@ -1025,7 +1025,7 @@ export namespace FirebaseAuthTypes {
|
|
1025
1025
|
*
|
1026
1026
|
* Once this has been called, every call to PhoneAuthProvider#verifyPhoneNumber() will skip the Play Integrity API verification flow and use the reCAPTCHA flow instead.
|
1027
1027
|
*
|
1028
|
-
*
|
1028
|
+
* > Calling this method a second time will overwrite the previously passed parameter.
|
1029
1029
|
*
|
1030
1030
|
* @android
|
1031
1031
|
* @param appName
|
@@ -1722,6 +1722,22 @@ export namespace FirebaseAuthTypes {
|
|
1722
1722
|
*/
|
1723
1723
|
signInWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
1724
1724
|
|
1725
|
+
/**
|
1726
|
+
* Revokes a user's Sign in with Apple token.
|
1727
|
+
*
|
1728
|
+
* #### Example
|
1729
|
+
*
|
1730
|
+
* ```js
|
1731
|
+
* // Generate an Apple ID authorizationCode for the currently logged in user (ie, with @invertase/react-native-apple-authentication)
|
1732
|
+
* const { authorizationCode } = await appleAuth.performRequest({ requestedOperation: appleAuth.Operation.REFRESH });
|
1733
|
+
* // Revoke the token
|
1734
|
+
* await firebase.auth().revokeToken(authorizationCode);
|
1735
|
+
* ```
|
1736
|
+
*
|
1737
|
+
* @param authorizationCode A generated authorization code from Sign in with Apple.
|
1738
|
+
*/
|
1739
|
+
revokeToken(authorizationCode: string): Promise<void>;
|
1740
|
+
|
1725
1741
|
/**
|
1726
1742
|
* Sends a password reset email to the given email address.
|
1727
1743
|
* Unlike the web SDK, the email will contain a password reset link rather than a code.
|
package/lib/index.js
CHANGED
@@ -299,6 +299,10 @@ class FirebaseAuthModule extends FirebaseModule {
|
|
299
299
|
.then(userCredential => this._setUserCredential(userCredential));
|
300
300
|
}
|
301
301
|
|
302
|
+
revokeToken(authorizationCode) {
|
303
|
+
return this.native.revokeToken(authorizationCode);
|
304
|
+
}
|
305
|
+
|
302
306
|
sendPasswordResetEmail(email, actionCodeSettings = null) {
|
303
307
|
return this.native.sendPasswordResetEmail(email, actionCodeSettings);
|
304
308
|
}
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '18.
|
2
|
+
module.exports = '18.3.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/auth",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.3.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",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"plist": "^3.0.5"
|
28
28
|
},
|
29
29
|
"peerDependencies": {
|
30
|
-
"@react-native-firebase/app": "18.
|
30
|
+
"@react-native-firebase/app": "18.3.0",
|
31
31
|
"expo": ">=47.0.0"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -42,5 +42,5 @@
|
|
42
42
|
"publishConfig": {
|
43
43
|
"access": "public"
|
44
44
|
},
|
45
|
-
"gitHead": "
|
45
|
+
"gitHead": "cca7053a12ea04c8476f880bd2220f44ee4ae17a"
|
46
46
|
}
|