Commit Graph

72 Commits (cc46fd34d7835a1cd8a5733f6968ca21ca9e3e01)

Author SHA1 Message Date
Richard van der Hoff 498ea53995 Don't create a guest login if user went to /login
This fixes an unintuitive behaviour where, if you follow a link to
riot.im/app/#/login, we take you to the login page, but not before we've
registered a guest account (or restarted the MatrixClient with the stored
creds).

This actually ends up simplifying some of the startup dance, as we special-case
the registration flows earlier on.
2017-06-14 11:02:38 +01:00
Richard van der Hoff 68e1a7be74 Clear persistent storage on login and logout
Make sure that we don't end up with sensitive data sitting around in the stores
from a previous session.
2017-06-13 12:51:47 +01:00
Luke Barnard 619830617a Merge branch 'develop' into luke/ilag-i18n
In order to get ILAG internationalised

Conflicts:
	src/components/structures/LoggedInView.js
	src/components/structures/MatrixChat.js
	src/components/views/dialogs/ChatCreateOrReuseDialog.js
	src/components/views/dialogs/SetDisplayNameDialog.js
	src/createRoom.js
	src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
David Baker c5cd6aecd6 Revert "Call MatrixClient.clearStores on logout"
This reverts commit c3d37c1ff9.

This commit was introducing a bug where no rooms would be shown if
you want straight to /#/login and logged in (because this causes
a guest session to be created but the indexeddb store not to be
cleared, so the new login picks up the stale indexedb sync data.
2017-06-05 15:54:44 +01:00
Richard van der Hoff c3d37c1ff9 Call MatrixClient.clearStores on logout
... to make sure that we don't have any sensitive data sitting around in the
stores.
2017-05-31 18:28:21 +01:00
Richard van der Hoff 4bc252a16b delint src/Lifecycle 2017-05-31 17:28:08 +01:00
Matthew Hodgson e30e45a82c Merge branch 'develop' into new-guest-access 2017-05-30 21:05:07 +01:00
Michael Telatynski 541cea020e use 4/5 of the default custom vars for useful things :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-29 19:04:37 +01:00
Matthew Hodgson 5c885922d9 Merge branch 'develop' into new-guest-access 2017-05-28 22:58:18 +01:00
Michael Telatynski 45cd80dedb Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/piwik 2017-05-27 20:59:35 +01:00
Michael Telatynski 98c2f9201b initial piwik stuff
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-27 20:47:09 +01:00
Matthew Hodgson 730258bd3c fix punctuation on e2e warning 2017-05-27 17:30:32 +01:00
David Baker 5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
David Baker d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
Luke Barnard 633c6b39f6 Add comment to Lifecycle 2017-05-16 11:58:37 +01:00
Luke Barnard 1176573f39 Implement SessionStore
This wraps session-related state into a basic flux store. The localStorage item 'mx_pass' is the only thing managed by this store for now but it could easily be extended to track other items (like the teamToken which is passed around through props a lot)
2017-05-12 12:02:45 +01:00
Luke Barnard 5151264f60 Merge branch 'develop' into new-guest-access
Conflicts:
	src/component-index.js
2017-05-11 13:22:30 +01:00
Luke Barnard 6f4eb9d8b1 Show password nag bar when user is PWLU 2017-05-05 16:31:33 +01:00
Richard van der Hoff bfceaa827b Log deviceid at login
- to help understand rageshakes
2017-05-04 18:04:47 +01:00
Richard van der Hoff 8d4663f437 Fix lint in Lifecycle.js 2017-05-04 18:03:35 +01:00
Luke Barnard 4f71f4c331 Store mx_pass at the same point as access_token
So that we don't overwrite the existing one every time we try to register.
2017-05-02 10:07:06 +01:00
Luke Barnard 30c5af35e5 Add state loggingIn to MatrixChat to fix flashing login
To prevent the login screen from flashing when refreshing the app, use some state to indicate that a login is in progress, and OR that with the existing `loading` boolean to show the `<Spinner>` instead of the default `<Login>`.

This might be too invasive, and a default spinner may be better.
2017-03-27 16:39:04 +01:00
David Baker dd33624454 Merge remote-tracking branch 'origin/develop' into dbkr/register_ui_auth
(This ended up mostly being merged by hand as git made a complete
mess of the merge)
2017-03-01 10:45:17 +00:00
Luke Barnard a339316ede Use a "normal" promise in order to .then 2017-02-28 15:40:49 +00:00
Luke Barnard 48a3d0d595 Refactor to not set team token in bad ways
Use the on_logged_in dispatch instead. Call setPage in one place, _onLoggedIn, when deciding which page to view on login. Change some require to import, var to const. Remove onTeamMemberRegistered and just use a nullable argument to onRegistered
2017-02-28 15:05:49 +00:00
David Baker 51467506f8 Port registration over to use InteractiveAuth
These changes are moved over from the dbkr/msisdn_signin branch
2017-02-24 11:41:23 +00:00
Luke Barnard e1a40a8ef0 Notify MatrixChat of teamToken after login 2017-02-23 16:30:26 +00:00
Kegan Dougal cca266c62c Review comments 2017-02-17 10:43:55 +00:00
Kegan Dougal 53f3b5780e Merge branch 'develop' into kegan/indexeddb 2017-02-16 16:10:23 +00:00
Kegan Dougal f07da44aa5 Don't handle logs db: It needs to close its connections first 2017-02-16 12:42:45 +00:00
Richard van der Hoff bdb8f9d052 Don't force-logout the user if reading localstorage fails
Give them a modal dialog to give them a chance to abort.
2017-02-15 19:33:39 +00:00
Kegan Dougal f628ee2ef0 Merge branch 'develop' into kegan/indexeddb 2017-02-10 16:16:17 +00:00
Kegan Dougal 407bcf1bb9 Delete database on logout. DI a SyncAccumulator. Log uncaught errors 2017-02-10 14:22:54 +00:00
Luke Barnard 260cb62438 Do not set team_token if not returned by RTS on login 2017-02-08 16:49:33 +00:00
Luke Barnard 3f9f59bb73 Import RtsClient at top 2017-02-07 15:23:23 +00:00
Luke Barnard 4f3549cc37 Fix: actually get the team token 2017-02-03 14:42:22 +00:00
Luke Barnard 173e80a5de Get team_token from the RTS on login
Use the /login endpoint of the RTS to get the team token when the user has successfully logged in.
2017-02-03 14:34:24 +00:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
David Baker 8d1095bc26 Don't throw exception on stop if no DMRoomMap
Prevents an exception when running the riot 'loading' tests in
isolation
2016-12-09 10:32:56 +00:00
David Baker 2be1cc9f85 Give DMRoomMap an explicit makeShared
Otherwise it will hang on to the old state client on logout.
2016-09-27 09:56:31 +01:00
David Baker 690309adfc Bring back the little green men without slowness
Introduces a singleton DMRoomMap that subscribes to account data to keep itself up to date so we don't have to keep doing the map inversion for each room tile.
2016-09-26 18:02:14 +01:00
Matthew Hodgson 026a2e6c7c fix guest login when in a RoomView 2016-09-17 02:19:27 +01:00
Matthew Hodgson dbd17ea953 improve e2e warning a bit 2016-09-02 17:37:16 +01:00
Richard van der Hoff f3a1c58fa9 Handle broken OlmAccounts
olm 1.0.0 made broken OlmAccounts, which we may be unable to restore with olm
1.1.0. Add some words to that effect, and make sure we clear the localstorage.
2016-09-02 11:28:04 +01:00
David Baker 33e9abe421 Merge pull request #410 from matrix-org/rav/use_server_device_id
Use server-generated deviceId
2016-08-12 11:40:55 +01:00
Richard van der Hoff 5fc98ffc49 Avoid setting device_id to 'undefined'
Deal with the situation where synapse doesn't give us a device_id on login:
don't set the device_id to 'undefined' in localstorage.
2016-08-12 11:22:04 +01:00
Richard van der Hoff a29325cc46 Set initial_device_display_name on login and register
Let Vector pass in a default device name, and thread it through everywhere to
set it on login and register calls
2016-08-12 10:55:02 +01:00
Richard van der Hoff df22768f1b Use server-generated deviceId 2016-08-12 07:31:15 +01:00
Richard van der Hoff e32c325863 Don't use MatrixClientPeg for temporary clients
Get rid of MatrixClientPeg.replaceUsingUrls, and instead create local,
temporary MatrixClients for the unauthed steps; we therefore only use
MatrixClientPeg for logged-in clients.
2016-08-11 16:23:03 +01:00
Richard van der Hoff bbfb9291f8 Refactor login token
move the logic for handling login tokens into Lifecycle.loadSession

This means it needs access to the (real) query parmeters, so it depends on
corresponding changes in vector-web.
2016-08-11 11:02:52 +01:00