Skip to content

Commit d959cc7

Browse files
committed
feat: Add login flow v2 diagram
Signed-off-by: Louis Chmn <louis@chmn.me>
1 parent 225df57 commit d959cc7

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

  • developer_manual/client_apis/LoginFlow

developer_manual/client_apis/LoginFlow/index.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,41 @@ This will return a 404 until authentication is done. Once a 200 is returned it i
161161
Use the server and the provided credentials to connect.
162162
Note that the 200 will only be returned once.
163163

164+
.. mermaid::
165+
166+
sequenceDiagram
167+
participant Browser
168+
actor User
169+
participant Application
170+
participant Server
171+
172+
User->>Application: Click "Log in"
173+
174+
Application->>Server: POST /login/v2
175+
activate Server
176+
Server->>Application: 200 JSON {login URL, poll token, poll endpoint}
177+
deactivate Server
178+
179+
Application->>Browser: Open login URL in system browser
180+
activate Browser
181+
182+
loop Every second (until success or 20 minutes timeout)
183+
Application-->>Server: POST /login/v2/poll with the poll token
184+
activate Server
185+
Server->>Application: 404 Not Found (not authorized yet)
186+
deactivate Server
187+
end
188+
189+
User->>Browser: Enter credentials (and 2FA if required)
190+
Browser->>Server: Submit login and grant client access
191+
192+
deactivate Browser
193+
Application-->>Server: POST /login/v2/poll with the poll token
194+
activate Server
195+
Server->>Application: 200 JSON {server, loginName, appPassword}
196+
deactivate Server
197+
198+
Application->>Application: Store credentials securely and finish setup
164199

165200
Troubleshooting
166201
---------------

0 commit comments

Comments
 (0)