[android] start of auth().currentUser methods refactor

This commit is contained in:
Salakar
2017-03-15 20:17:04 +00:00
parent a780f9677d
commit afece365e4
2 changed files with 41 additions and 34 deletions

View File

@@ -102,15 +102,6 @@ export default class User {
toJSON() {
return Object.assign({}, this._user);
return {
uid: this.uid,
email: this.email,
emailVerified: this.emailVerified,
displayName: this.displayName,
providerId: this.providerId,
isAnonymous: this.isAnonymous,
photoURL: this.photoURL,
};
}
/**
@@ -118,7 +109,7 @@ export default class User {
* @return {Promise}
*/
delete(): Promise<Object> {
return FirebaseAuth.delete();
return this._auth._interceptUserValue(FirebaseAuth.delete());
}
/**
@@ -126,7 +117,7 @@ export default class User {
* @return {Promise}
*/
reload(): Promise<Object> {
return promisify('reload', FirebaseAuth, 'auth/')();
return this._auth._interceptUserValue(FirebaseAuth.reload());
}
// TODO no RN android method yet, the SDK does have .getProviderData but returns as a List.