[js][auth] implemented currentUser.updateProfile() method

This commit is contained in:
Salakar 2017-03-18 01:10:34 +00:00
parent 1789fae541
commit ea5d7d409f
1 changed files with 3 additions and 2 deletions

View File

@ -144,13 +144,14 @@ export default class User {
return FirebaseAuth.getToken();
}
// TODO no RN android method yet, the SDK does have .getProviderData but returns as a List.
// TODO return from native
// get providerData() {
// return this._valueOrNull('providerData');
// }
/**
* Update the current user's email
*
* @param {string} email The user's _new_ email
* @return {Promise} A promise resolved upon completion
*/
@ -164,7 +165,7 @@ export default class User {
* @return {Promise}
*/
updateProfile(updates: Object = {}): Promise<Object> {
return promisify('updateUserProfile', FirebaseAuth, 'auth/')(updates);
return this._auth._interceptUserValue(FirebaseAuth.updateProfile(updates));
}
/**