-
Notifications
You must be signed in to change notification settings - Fork 10
/
fig_login.plantuml
49 lines (43 loc) · 1.31 KB
/
fig_login.plantuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@startuml
|#fff0c4|Localstorage Empty|
start
:Login Page;
#palegreen:User Enters Email and Password;
note left
The password is requested
from the user for UX reasons,
hashed and temporarily
stored in vuex
end note
:* Wallet checks if user exists
* Wallet fetches Payload (2fa settings) from Backend
* sha256 hash password and store in vuex;
if(Entry For Email In Database) then (not found)
#pink:show error message;
-[#black,dotted]->
#lightgrey:retry || route to /signup;
kill;
else (entry found)
if (2fa email OR 2fa authenticator) then (enabled)
:2fa Email is sent to user if enabled;
:User enters 2fa codes;
endif
:* Wallet fetches encrypted seed phrase from backend
* if 2fa is enabled then backend only
returns encrypted seed phrase if 2fa codes are correct;
:* Save Email in LocalStorage
* Save encrypted seed phrase in LocalStorage;
|#f4ffc4|Encrypted Seed Phrase In Localstore|
:Decrypt Seed Phrase with Hashed Password;
if(Unlock With Password) then (password incorrect)
#pink:show recovery options;
end;
else (success)
|#lightgreen|Unlock Successful|
:* Save hashed password in session store
* Init vuex datastore: address etc.;
#lightgreen:show wallet;
kill;
endif
endif
@enduml