File tree Expand file tree Collapse file tree
developer_manual/client_apis/LoginFlow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,6 +161,43 @@ 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.
162162Note 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 default 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+ Note right of Server: Create an ephemeral session <br/>which lives for 5 minutes
193+
194+ deactivate Browser
195+ Application-->>Server: POST /login/v2/poll with the poll token
196+ activate Server
197+ Server->>Application: 200 JSON {server, loginName, appPassword}
198+ deactivate Server
199+
200+ Application->>Application: Store credentials securely and finish setup
164201
165202Troubleshooting
166203---------------
You can’t perform that action at this time.
0 commit comments