mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-29 04:35:43 +08:00
[android] start of auth().currentUser methods refactor
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user