2
0
mirror of synced 2025-03-01 14:30:39 +00:00

implement currentUser.toJSON() method

This commit is contained in:
Salakar 2017-03-13 20:01:45 +00:00
parent f9f075f43d
commit 7710dd94a7

View File

@ -74,11 +74,7 @@ export default class User {
return this._valueOrNull('photoURL'); return this._valueOrNull('photoURL');
} }
get photoUrl() { // TODO no RN android method yet, the SDK does have .getProviderData but returns as a List.
return this._valueOrNull('photoURL');
}
// TODO no android method yet, the SDK does have .getProviderData but returns as a List.
// get providerData() { // get providerData() {
// return this._valueOrNull('providerData'); // return this._valueOrNull('providerData');
// } // }
@ -101,6 +97,18 @@ export default class User {
* METHODS * METHODS
*/ */
toJSON() {
return {
uid: this.uid,
email: this.email,
emailVerified: this.emailVerified,
displayName: this.displayName,
providerId: this.providerId,
isAnonymous: this.isAnonymous,
photoURL: this.photoURL,
};
}
delete(...args) { delete(...args) {
return this._auth.deleteUser(...args); return this._auth.deleteUser(...args);
} }