@@ -20,52 +20,62 @@ Please see LICENSE files in the repository root for full details.
2020 * │ LOADING │─────────────────────────────►│ CONFIRM_LOCK_ │
2121 * │ │◄─────────────────────────────│ THEFT │
2222 * └─────────────────┘ Lock theft confirmed └─────────────────┘
23- * Session recovered │ │ │
24- * ┌──────────────┘ │ └────────────────┐
25- * │ ┌─────────────┘ │ No previous session
26- * │ │ Token/OIDC login succeeded │
27- * │ │ ▼
28- * │ │ ┌─────────────────┐
29- * │ │ │ WELCOME │ (from all other states
30- * │ │ │ │ except LOCK_STOLEN)
31- * │ │ └─────────────────┘ │
32- * │ │ "Create Account" │ │ "Sign in" │ Client logged out
33- * │ │ ┌────────────────────────┘ │ │
34- * │ │ │ │ ┌────────────────────┘
35- * │ │ │ │ │
36- * │ │ ▼ "Create an ▼ ▼ "Forgot
37- * │ │ ┌─────────────────┐ account" ┌─────────────────┐ password" ┌─────────────────┐
38- * │ │ │ REGISTER │◄───────────────│ LOGIN │───────────────►│ FORGOT_PASSWORD │
39- * │ │ │ │───────────────►│ │◄───────────────│ │
40- * │ │ └─────────────────┘ "Sign in here" └─────────────────┘ Complete / └─────────────────┘
41- * │ │ │ │ "Sign in instead" ▲
42- * │ │ └────────────────────────────────┐ │ │
43- * │ └────────────────────────────────────────┐ │ │ │
44- * │ ▼ ▼ ▼ │
45- * │ ┌──────────────────┐ │
46- * │ │ (postLoginSetup) │ │
47- * │ └──────────────────┘ │
48- * │ ┌────────────────────────────────────┘ │ │ │
49- * │ │ E2EE not enabled ┌─────────────┘ └──────┐ │
50- * │ │ │ Account has │ Account lacks │
51- * │ │ │ cross-signing │ cross-signing │
52- * │ │ │ keys │ keys │
53- * │ │ Client started and ▼ ▼ │
54- * │ │ force_verification ┌─────────────────┐ ┌─────────────────┐ │
55- * │ │ pending │ COMPLETE_ │ │ E2E_SETUP │ │
56- * │ │ ┌─────────────────►│ SECURITY │ │ │ │
57- * │ │ │ └─────────────────┘ └─────────────────┘ │ "Forgotten
58- * │ │ │ ┌───────────────────────┘ │ │ your
59- * │ │ │ │ ┌───────────────────────────────────────────────┘ │ password?"
60- * │ │ │ │ │ │
61- * │ │ │ │ │ (from all other states │
62- * │ │ │ │ │ except LOCK_STOLEN) │
63- * │ │ │ │ │ └──────────────┐ │
64- * ▼ ▼ │ ▼ ▼ Soft logout error ▼ │
65- * ┌─────────────────┐ ┌─────────────────┐
66- * │ LOGGED_IN │ Re-authentication succeeded │ SOFT_LOGOUT │
67- * │ │◄────────────────────────────────────────────────────────│ │
68- * └─────────────────┘ └─────────────────┘
23+ * Session recovered │ │ │ Token/OIDC login succeeded
24+ * ┌──────────────┘ │ └──────────────────────────────────────────────────────────────────┐
25+ * │ └───────────────────────────────────────────┐ │
26+ * │ │ No previous session │
27+ * │ ▼ │
28+ * │ (from all other states ┌─────────────────┐ │
29+ * │ except LOCK_STOLEN) │ WELCOME │ │
30+ * │ │ │ │ │
31+ * │ │ Client logged out └─────────────────┘ │
32+ * │ │ │ │ │
33+ * │ └──────────────────────────┐ "Sign in" │ │ "Create account" │
34+ * │ │ ┌────────────┘ └──────────────┐ │
35+ * │ │ │ │ │
36+ * │ "Forgot ▼ ▼ "Create an ▼ │
37+ * │ ┌─────────────────┐ password" ┌─────────────────┐ account" ┌─────────────────┐ │
38+ * │ │ FORGOT_PASSWORD │◄───────────────│ LOGIN │───────────────►│ REGISTER │ │
39+ * │ │ │───────────────►│ │◄───────────────│ │ │
40+ * │ └─────────────────┘ Complete / └─────────────────┘ "Sign in here" └─────────────────┘ │
41+ * │ ▲ "Sign in instead" │ │ │
42+ * │ │ └──────────────────────┐ ┌─────────┘ │
43+ * │ │"Forgotten your │ │ ┌──────────────────┘
44+ * │ │ password?" │ │ │
45+ * │ │ │ │ │
46+ * │ ┌─────────────────┐ Soft-logout error │ │ │
47+ * │ │ SOFT_LOGOUT │◄───────────── (from all other states │ │ │
48+ * │ │ │ except LOCK_STOLEN) │ │ │
49+ * │ └─────────────────┘ │ │ │
50+ * │ │ Re-authentication succeeded ▼ ▼ ▼
51+ * │ │ ┌──────────────────┐
52+ * ▼ ▼ │ (postLoginSetup) │
53+ * ┌─────────────────┐ └──────────────────┘
54+ * │ PENDING_CLIENT_ │ Account has │ │ │ Account lacks
55+ * │ START │ cross-signing │ │ │ cross-signing
56+ * └─────────────────┘ keys │ │ │ keys
57+ * │ │ │ │ │
58+ * │ └───────────────────────────────┐ │ │ │
59+ * │ Client started, │ │ │ └──────┐
60+ * │ force_verification pending │ │ │ │
61+ * │ ▼ │ │ │
62+ * │ Client started, ┌─────────────────┐ │ │ │
63+ * │ force_verification │ COMPLETE_ │◄────────────┘ │ ▼
64+ * │ not needed │ SECURITY │ │ ┌─────────────────┐
65+ * │ └─────────────────┘ │ │ E2E_SETUP │
66+ * │ │ │ │ │
67+ * │ ┌─────────────────────────────────────┘ E2EE not enabled │ └─────────────────┘
68+ * │ │ ┌─────────────────────────────────────────────────────────────┘ │
69+ * │ │ │ ┌──────────────────────────────────────────────────────────────────────┘
70+ * │ │ │ │
71+ * │ │ │ │
72+ * │ │ │ │
73+ * │ │ │ │
74+ * ▼ ▼ ▼ ▼
75+ * ┌─────────────────┐
76+ * │ LOGGED_IN │
77+ * │ │
78+ * └─────────────────┘
6979 *
7080 * (from all other states)
7181 * │
@@ -102,6 +112,12 @@ enum Views {
102112 // flow to setup SSSS / cross-signing on this account
103113 E2E_SETUP ,
104114
115+ /**
116+ * We have successfully recovered a session from localstorage, but the client
117+ * has not yet been started.
118+ */
119+ PENDING_CLIENT_START ,
120+
105121 // we are logged in with an active matrix client. The logged_in state also
106122 // includes guests users as they too are logged in at the client level.
107123 LOGGED_IN ,
0 commit comments