1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Remove generateClientSecret and use the one the js sdk gives us.

This commit is contained in:
David Baker
2016-01-18 17:50:27 +00:00
parent cc3d27bd4b
commit e68972fb1a

View File

@@ -35,7 +35,7 @@ class PasswordReset {
baseUrl: homeserverUrl,
idBaseUrl: identityUrl
});
this.clientSecret = generateClientSecret();
this.clientSecret = this.client.generateClientSecret();
this.identityServerDomain = identityUrl.split("://")[1];
}
@@ -89,16 +89,4 @@ class PasswordReset {
}
}
// from Angular SDK
function generateClientSecret() {
var ret = "";
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 32; i++) {
ret += chars.charAt(Math.floor(Math.random() * chars.length));
}
return ret;
}
module.exports = PasswordReset;