Merge pull request #1041 from matrix-org/jryans/rm-id-params-request-token

Remove IS details from requestToken to HS
This commit is contained in:
J. Ryan Stinnett
2019-09-23 14:43:03 +01:00
committed by GitHub
+3 -1
View File
@@ -3478,7 +3478,9 @@ MatrixClient.prototype.requestPasswordMsisdnToken = function(phoneCountry, phone
MatrixClient.prototype._requestTokenFromEndpoint = async function(endpoint, params) {
const postParams = Object.assign({}, params);
if (this.idBaseUrl) {
// If the HS supports separate add and bind, then requestToken endpoints
// don't need an IS as they are all validated by the HS directly.
if (!await this.doesServerSupportSeparateAddAndBind() && this.idBaseUrl) {
const idServerUrl = url.parse(this.idBaseUrl);
if (!idServerUrl.host) {
throw new Error("Invalid ID server URL: " + this.idBaseUrl);