[auth][js] Updated method names now removed/deprecated in the web SDK
This commit is contained in:
parent
231f6852de
commit
c609539747
|
@ -4,6 +4,7 @@ export default {
|
|||
token: email,
|
||||
secret: password,
|
||||
provider: 'password',
|
||||
providerId: 'password',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@ export default {
|
|||
token,
|
||||
secret: '',
|
||||
provider: 'facebook',
|
||||
providerId: 'facebook',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@ export default {
|
|||
token,
|
||||
secret: '',
|
||||
provider: 'github',
|
||||
providerId: 'github',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@ export default {
|
|||
token,
|
||||
secret,
|
||||
provider: 'google',
|
||||
providerId: 'google',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@ export default {
|
|||
token,
|
||||
secret,
|
||||
provider: 'twitter',
|
||||
providerId: 'twitter',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue