1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

fix(login): saves access_token and user_id after login for all login types

Signed-off-by: Sergii Stotskyi <sergiy.stotskiy@gmail.com>

Fixes #876
This commit is contained in:
Sergii Stotskyi
2019-05-28 17:45:02 +03:00
parent b199f133b3
commit 4ef970b4da
2 changed files with 26 additions and 2 deletions

View File

@@ -263,8 +263,7 @@ MatrixBaseApis.prototype.login = function(loginType, data, callback) {
return this._http.authedRequest(
(error, response) => {
if (loginType === "m.login.password" && response &&
response.access_token && response.user_id) {
if (response && response.access_token && response.user_id) {
this._http.opts.accessToken = response.access_token;
this.credentials = {
userId: response.user_id,