Skip to content

Commit 66d1972

Browse files
authored
Merge pull request #14972 from nextcloud/artonge/feat/add_diagram_for_login_flow_v2
feat: Add login flow v2 diagram
2 parents e15efeb + cd75248 commit 66d1972

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

  • developer_manual/client_apis/LoginFlow

developer_manual/client_apis/LoginFlow/index.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
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 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

165202
Troubleshooting
166203
---------------

0 commit comments

Comments
 (0)