Commit Graph

16 Commits (a66ffa43c419f1fa492331b92cd0188d910c26ba)

Author SHA1 Message Date
Travis Ralston aba61fa390 Revert "Support refresh tokens (#7802)"
This reverts commit 839593412c.
2022-02-16 12:32:38 -07:00
Travis Ralston 839593412c
Support refresh tokens (#7802)
MSC: https://github.com/matrix-org/matrix-doc/pull/2918
Fixes https://github.com/vector-im/element-web/issues/18698
Fixes https://github.com/vector-im/element-web/issues/20648
**Requires https://github.com/matrix-org/matrix-js-sdk/pull/2178**

**Note**: There's a lot of logging in this PR. That is intentional to ensure that if/when something goes wrong we can chase the exact code path. It does not log any tokens - just where the code is going. Overall, it should be fairly low volume spam (and can be relaxed at a later date).

----

This approach uses indexeddb (through a mutex library) to manage which tab actually triggers the refresh, preventing issues where multiple tabs try to update the token. If multiple tabs update the token then the server might consider the account hacked and hard logout all the tokens.

If for some reason the timer code gets it wrong, or the user has been offline for too long and the token can't be refreshed, they should be sent to a soft logout screen by the server. This will retain the user's encryption state - they simply need to reauthenticate to get an active access token again.

This additionally contains a change to fix soft logout not working, per the issue links above.

Of interest may be the IPC approach which was ultimately declined in favour of this change instead: https://github.com/matrix-org/matrix-react-sdk/pull/7803
2022-02-15 20:16:49 +00:00
Aaron Raimist bdc56be863
Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:23:37 -05:00
Dariusz Niemczyk 2d1d42b90e
Globally replace all console.logs via codemod (#6827)
This commit replaces all the `console.log` to `logger.log` via an automated script.
Related: vector-im/element-web#18425
2021-09-21 09:48:09 -06:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Michael Telatynski 4526998332 Remove brand prefix too 2021-06-01 11:04:45 +01:00
Michael Telatynski f11a7083ae Switch to stable endpoint/fields for MSC2858 2021-06-01 11:01:09 +01:00
J. Ryan Stinnett d7e6f4b4b5 Add basic types 2021-04-23 17:05:50 +01:00
Travis Ralston 1d9d0cd7be Convert a bunch more js-sdk imports to absolute paths
Turns out a lot of the typescript warnings about improper warnings were correct. TypeScript appears to be pulling in two copies of the js-sdk when we do this, which can lead to type conflicts (or worse: the wrong code entirely). We fix this at the webpack level by explicitly importing from `src`, but some alternative build structures have broken tests because of this - jest ends up pulling in the "wrong" js-sdk, breaking things.
2021-03-18 20:50:34 -06:00
Michael Telatynski 34ae766893 Wire up MSC2858 brand attribute
For better brand adherance.
Also removes old support for https IdP icons.
2021-01-27 16:15:47 +00:00
Michael Telatynski 940fdb8e2f Better adhere to MSC process 2020-12-16 10:07:07 +00:00
Michael Telatynski f7d7182dc9 Iterate Multi-SSO support 2020-11-24 12:09:11 +00:00
Michael Telatynski 1d53a5cf23 Initial support for MSC2858 2020-11-24 11:18:11 +00:00
J. Ryan Stinnett 388cb0e2c1 Add security customisation points
This adds various customisations point in the app for security related
decisions. By default, these do nothing, but would be customised at the
app level via module replacement (so that no changes are needed here in the
SDK).

Fixes https://github.com/vector-im/element-web/issues/15350
2020-10-16 11:21:44 +01:00
J. Ryan Stinnett 5a4ca4578a Sprinkle some ts-ignore lines 2020-10-07 17:18:19 +01:00
J. Ryan Stinnett 11eb9b59e6 Convert src/Login.js to TypeScript 2020-10-07 11:47:27 +01:00