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

39 Commits

Author SHA1 Message Date
jkasun
a73dabcb67 Console logging to loglevel 2019-05-19 09:29:40 +05:30
Richard van der Hoff
eccea7411f Fix error handling in interactive-auth
Now that we are using bluebird, `defer.reject` is not implicitly bound, so we
need to call it properly rather than just passing it into the catch handler.

This fixes an error:

   promise.js:711 Uncaught TypeError: Cannot read property 'promise' of undefined
2017-08-21 16:31:42 +01:00
Richard van der Hoff
cfffbc4a09 replace q method calls with bluebird ones
```
find src spec -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try)\(/Promise.$1(/'
```
2017-07-12 23:33:55 +01:00
Richard van der Hoff
a5d3dd942e q(...) -> Promise.resolve
```
find src spec -name '*.js' |
    xargs perl -i -pe 's/\bq(\([^(]*\))/Promise.resolve$1/'
```
2017-07-12 23:32:28 +01:00
Richard van der Hoff
b96062b6de replace imports of q with bluebird
```
find src spec -name '*.js' |
   xargs perl -i -pe 'if (/require\(.q.\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src spec -name '*.js' |
   xargs perl -i -pe 'if (/import q/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 23:32:28 +01:00
David Baker
68d9662fe5 Automatically complete dummy auth
Dummy auth flows, bu definition, do not require a response from
the user, and so should just be completed automatically by
interactive-auth.
2017-04-12 18:36:23 +01:00
David Baker
66ce31f6d6 Add docs. 2017-03-21 18:40:00 +00:00
David Baker
cf486aedbd Extend 'ignoreFailure' to be 'background'
This allows us to also use it to decide whether or not to show
the app as busy in the UI. We pass this flag up into the
makeRequest callback so it can use it as such.
2017-03-21 18:37:08 +00:00
David Baker
421a35c201 Stray brace 2017-03-16 12:33:24 +00:00
David Baker
fcfc7b6cec Better doc & throw consistently 2017-03-16 12:02:06 +00:00
David Baker
6c2e8eba1c Do no-auth-flow error handling more properly 2017-03-15 16:42:57 +00:00
David Baker
c9c3937f4b Move exception throw into _chooseFlow 2017-03-15 14:33:31 +00:00
David Baker
7777cbf6da Lint 2017-03-15 14:21:34 +00:00
David Baker
a8a7d327ff Give a better error message
if the HS doesn't support msisdn registeration
2017-03-15 14:14:04 +00:00
David Baker
8b4b0e0d39 Save the completed flows (#389)
Otherwise we get very confused and go back to the start when given
a response with no flows etc.

Only copy data if none of the 3 fields are defined, since that's
more the situation we actually want to handle.
2017-03-15 11:15:35 +00:00
David Baker
8f790d406f Fix lint (add jsdoc) 2017-03-06 09:27:29 +00:00
David Baker
7e2a256229 Add getEmailSid
Other places sometimes need to re-use the email sid to send proof
of ownership of a email address to somewhere else.
2017-03-03 17:40:26 +00:00
David Baker
1d591034ff Doc sid param 2017-03-03 10:15:09 +00:00
David Baker
3c246a97e8 More docs 2017-03-02 14:15:43 +00:00
David Baker
ca395541b6 Backwards compat 2017-03-02 14:09:08 +00:00
David Baker
30d9dec438 Doc error objects pass to stage update 2017-03-02 14:07:25 +00:00
David Baker
bdae9521cb Copy session ID too 2017-03-01 17:35:18 +00:00
David Baker
cb7fb6c7be Keep data from response in any case
Fix up flows if they're absent
2017-03-01 17:10:08 +00:00
David Baker
a33e4477af Comment the ignoring of failures 2017-03-01 16:35:37 +00:00
David Baker
d435192e22 Remove unnecesary check 2017-03-01 16:33:55 +00:00
David Baker
9480447637 Comment stageState 2017-03-01 16:09:43 +00:00
David Baker
7dbe852606 Comment why we choose flows 2017-03-01 16:07:31 +00:00
David Baker
d7216f44f5 PR feedback: Move requestEmailToken...
...to the UI component (in react-sdk)
2017-03-01 16:02:50 +00:00
David Baker
32360e7473 Lint 2017-02-28 14:13:50 +00:00
David Baker
90482377b7 Fix linting 2017-02-28 14:08:41 +00:00
David Baker
08a3aea1c7 Fix tests 2017-02-28 13:44:44 +00:00
David Baker
6eebd1e957 Ignore failures when polling for auth completion 2017-02-27 17:23:02 +00:00
David Baker
033bd9bbdc Support polling
for out-of-band auth completion
2017-02-24 17:22:57 +00:00
David Baker
af634d3a7d Add m.login.email.identity support to UI auth
Extends the interactive-auth to support m.login.email.identity
This also includes the ability to resume a UI auth session given
the approirpiate information (ie. to resume the auth flow having
click a link in a verification email).
2017-02-24 11:18:21 +00:00
David Baker
423175f539 eslint --fix for dangley commas on function calls 2017-01-20 16:12:02 +00:00
David Baker
7bca05af64 eslint ---fix for prefer-const 2017-01-19 17:42:10 +00:00
Kegan Dougal
7ed65407e6 Pass through eslint --fix 2017-01-13 10:49:32 +00:00
David Baker
0a11404be2 Fix legitimate JSDoc errors 2017-01-12 11:46:07 +00:00
Kegan Dougal
ae6a409cc2 Move /lib to /src 2017-01-11 10:09:04 +00:00