[auth][js] Updated method names now removed/deprecated in the web SDK

This commit is contained in:
Elliot Hesp 2017-05-25 12:44:39 +01:00
parent 231f6852de
commit c609539747
6 changed files with 17 additions and 3 deletions

View File

@ -4,6 +4,7 @@ export default {
token: email,
secret: password,
provider: 'password',
providerId: 'password',
};
},
};

View File

@ -4,6 +4,7 @@ export default {
token,
secret: '',
provider: 'facebook',
providerId: 'facebook',
};
},
};

View File

@ -4,6 +4,7 @@ export default {
token,
secret: '',
provider: 'github',
providerId: 'github',
};
},
};

View File

@ -4,6 +4,7 @@ export default {
token,
secret,
provider: 'google',
providerId: 'google',
};
},
};

View File

@ -4,6 +4,7 @@ export default {
token,
secret,
provider: 'twitter',
providerId: 'twitter',
};
},
};

View File

@ -113,7 +113,7 @@ export default class User {
*
* @param credential
*/
link(credential: CredentialType) {
linkWithCredential(credential: CredentialType) {
return this._auth._interceptUserValue(FirebaseAuth.link(credential.provider, credential.token, credential.secret));
}
@ -121,11 +121,10 @@ export default class User {
* Re-authenticate a user with a third-party authentication provider
* @return {Promise} A promise resolved upon completion
*/
reauthenticate(credential: CredentialType) {
reauthenticateWithCredential(credential: CredentialType) {
return this._auth._interceptUserValue(FirebaseAuth.reauthenticate(credential.provider, credential.token, credential.secret));
}
/**
* Reload the current user
* @return {Promise}
@ -136,9 +135,19 @@ export default class User {
/**
* get the token of current user
* @deprecated Deprecated getToken in favor of getIdToken.
* @return {Promise}
*/
getToken(forceRefresh: Boolean = false): Promise<Object> {
console.warn('Deprecated firebase.User.prototype.getToken in favor of firebase.User.prototype.getIdToken.');
return FirebaseAuth.getToken(forceRefresh);
}
/**
* get the token of current user
* @return {Promise}
*/
getIdToken(forceRefresh: Boolean = false): Promise<Object> {
return FirebaseAuth.getToken(forceRefresh);
}