You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Function to get the fallback url for interactive auth
This commit is contained in:
@@ -290,6 +290,23 @@ MatrixBaseApis.prototype.deactivateAccount = function(auth, callback) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the fallback URL to use for unknown interactive-auth stages.
|
||||||
|
*
|
||||||
|
* @param {string} loginType the type of stage being attempted
|
||||||
|
* @param {string} authSessionId the auth session ID provided by the homeserver
|
||||||
|
*
|
||||||
|
* @return {string} HS URL to hit to for the fallback interface
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getFallbackAuthUrl = function(loginType, authSessionId) {
|
||||||
|
var path = utils.encodeUri("/auth/$loginType/fallback/web", {
|
||||||
|
$loginType: loginType,
|
||||||
|
});
|
||||||
|
|
||||||
|
return this._http.getUrl(path, {
|
||||||
|
session: authSessionId,
|
||||||
|
}, httpApi.PREFIX_R0);
|
||||||
|
};
|
||||||
|
|
||||||
// Room operations
|
// Room operations
|
||||||
// ===============
|
// ===============
|
||||||
|
|||||||
Reference in New Issue
Block a user