+@startuml
+
+Title headless flow
+
+actor user
+participant client
+participant library
+participant handler
+participant server
+participant browser
+participant twitch
+
+client -> library: start authentication flow
+library -> server: start server
+library --> client: login URL
+client -> user: present URL
+user -> twitch: twitch login and grant flow
+twitch --> browser: redirect with token
+browser -> server: fetch page
+server -> handler
+handler --> browser
+browser -> browser: put access token in html form
+browser -> server: POST form with access token
+server -> handler
+handler -> handler: pass through handler
+handler --> client: give access token
+handler --> browser: pass through handler
+handler -> server: stop server
+@enduml
+
+@startuml
+Title server flow
+
+actor user
+participant client
+participant library
+participant handler
+participant server
+participant browser
+participant twitch
+
+group setup
+client -> library: create handler
+library --> client
+client -> server: add handler at URL
+client -> server: start server
+end
+client -> user: present login
+note left
+The login url is the
+exact url on which the
+handler is registered
+to the server
+end note
+user -> twitch: twitch login and grant flow
+twitch --> browser: redirect with token
+browser -> server: fetch page
+server -> handler
+handler --> browser
+browser -> browser: put access token in html form
+browser -> server: POST form with access token
+server -> handler
+handler -> handler: pass through
+handler -> client: give access token
+handler --> browser: pass through handler
+
+@enduml