[auth] Remove superfluous getCurrentUser method which doesn’t exist in API

This commit is contained in:
Chris Bianca 2018-01-16 17:39:27 +00:00
parent 63859b311d
commit 285e31df65
3 changed files with 0 additions and 47 deletions

View File

@ -350,26 +350,6 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
}
}
/**
* getCurrentUser - returns the current user, probably no need for this due to
* js side already listening for user auth changes
*
* @param promise
*/
@ReactMethod
public void getCurrentUser(String appName, final Promise promise) {
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(firebaseApp);
FirebaseUser user = firebaseAuth.getCurrentUser();
Log.d(TAG, "getCurrentUser");
if (user == null) {
promiseNoUser(promise, false);
} else {
promiseWithUser(user, promise);
}
}
/* ----------------------
* .currentUser methods
* ---------------------- */

View File

@ -610,25 +610,6 @@ RCT_EXPORT_METHOD(sendPasswordResetEmail:(NSString *) appDisplayName
}
}
/**
getCurrentUser
@param RCTPromiseResolveBlock resolve
@param RCTPromiseRejectBlock reject
@return
*/
RCT_EXPORT_METHOD(getCurrentUser:
(NSString *) appDisplayName
resolver:
(RCTPromiseResolveBlock) resolve
rejecter:
(RCTPromiseRejectBlock) reject) {
FIRApp *firApp = [RNFirebaseUtil getApp:appDisplayName];
FIRUser *user = [FIRAuth authWithApp:firApp].currentUser;
[self promiseWithUser:resolve rejecter:reject user:user];
}
/**
signInWithCustomToken

View File

@ -319,14 +319,6 @@ export default class Auth extends ModuleBase {
return getNativeModule(this).checkActionCode(code);
}
/**
* Get the currently signed in user
* @return {Promise}
*/
getCurrentUser(): Promise<User | null> {
return this._interceptUserValue(getNativeModule(this).getCurrentUser());
}
/**
* Returns a list of authentication providers that can be used to sign in a given user (identified by its main email address).
* @return {Promise}