doc update: how to use streamlined auth-flow
Created by: abeatrix
Close: https://github.com/sourcegraph/sourcegraph/issues/36728
Update docs with details on how the streamlined auth flow introduced in https://github.com/sourcegraph/sourcegraph/pull/35339 works, and how it can be implemented effectively by other extensions.
A copy of the diagram for the streamlined auth flow:
PS: This is the first time I've created a diagram so any feedback is greatly appreciated
sequenceDiagram
Extension (Client App)->>Sourcegraph Auth UI (Browser): Open auth URL with the<br/>`requestFrom` URL param
Sourcegraph Auth UI (Browser)->>Token Creation Callback Page: Redirect authenticated users
Token Creation Callback Page->>Token Creation Callback Page: Verify extension
Note right of Token Creation Callback Page: Check if the allow list has<br/>the `requestFrom` value
Token Creation Callback Page->>Web Server: Request token for verified extension
Web Server->>Token Creation Callback Page: Create and return token
Token Creation Callback Page->>Sourcegraph Auth UI (Browser): Present token
Token Creation Callback Page->>Extension (Client App): Return token with redirect URL
Note right of Token Creation Callback Page: Open pre-authorized redirect URL<br/>for the verified extension with<br/>token added to the `code` URL params
Extension (Client App)->>Extension (Client App): Import token
Note right of Extension (Client App): Retrieve token from URL param<br>using a custom URL handler
CC @philipp-spiess @vdavid for jetbrains
Test plan
N/A - Docs update
App preview:
Check out the client app preview documentation to learn more.