[auth][android] remove `firebase` providerData from user responses, see: https://github.com/firebase/firebase-ios-sdk/issues/140
This commit is contained in:
parent
c4d066fd55
commit
e96c5db8d1
|
@ -718,9 +718,9 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
/**
|
||||
* unlink
|
||||
*
|
||||
* @url https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser.html#unlink(java.lang.String)
|
||||
* @param providerId
|
||||
* @param promise
|
||||
* @url https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser.html#unlink(java.lang.String)
|
||||
*/
|
||||
@ReactMethod
|
||||
public void unlink(final String appName, final String providerId, final Promise promise) {
|
||||
|
@ -1010,6 +1010,9 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
private WritableArray convertProviderData(List<? extends UserInfo> providerData) {
|
||||
WritableArray output = Arguments.createArray();
|
||||
for (UserInfo userInfo : providerData) {
|
||||
// remove 'firebase' provider data - android fb sdk
|
||||
// should not be returning this as the ios/web ones don't
|
||||
if (!userInfo.getProviderId().equals("firebase")) {
|
||||
WritableMap userInfoMap = Arguments.createMap();
|
||||
userInfoMap.putString("providerId", userInfo.getProviderId());
|
||||
userInfoMap.putString("uid", userInfo.getUid());
|
||||
|
@ -1027,6 +1030,7 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
|
||||
output.pushMap(userInfoMap);
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue