implement currentUser.toJSON() method
This commit is contained in:
parent
f9f075f43d
commit
7710dd94a7
|
@ -74,11 +74,7 @@ export default class User {
|
|||
return this._valueOrNull('photoURL');
|
||||
}
|
||||
|
||||
get photoUrl() {
|
||||
return this._valueOrNull('photoURL');
|
||||
}
|
||||
|
||||
// TODO no android method yet, the SDK does have .getProviderData but returns as a List.
|
||||
// TODO no RN android method yet, the SDK does have .getProviderData but returns as a List.
|
||||
// get providerData() {
|
||||
// return this._valueOrNull('providerData');
|
||||
// }
|
||||
|
@ -101,6 +97,18 @@ export default class User {
|
|||
* 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) {
|
||||
return this._auth.deleteUser(...args);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue