Content
View differences
Updated by Pavel Balashou over 2 years ago
**As** a OpenProject developer working on integrations with third party software using OAuth access tokens
**I want to** have a page per \`OAuthClient\` that will kick off the OAuth grant flow unless an access token is already available
**so that** so that I can sent the user to that page every time I want to make sure that the OAuth connection is successfully setup
**Acceptance criteria**
* There is a sibling route to the `callback` route `ensure_connection`
* After granting the access token, or when the token was already there, a page gets rendered, stating that the connection was setup successfully.
**I want** the application to make sure I have granted OpenProject permissions to access a storage provider(OneDrive/Nextcloud) on my behalf
**And** to make sure I am able to see a project folder before redirecting me to the storage
**so that** I have smooth experience with OpenProject storage integration in the current moment and later(no need to grant access later)
**Acceptance criteria**
* In case a user has no permissions to access a project folder (for instance, due to the Nextcloud synchronization delay happening in the background) there is a waiting modal. And the redirect happens after the user gets permissions set.
* All links to storages in a project menu have the following format: [_**https://openproject.local/oauth\_clients/4262df2b-77bb-49c2-a5df-28355da676d2/ensure\_connection?destination\_url=https%3A%2F%2Fopenproject.local%2Fprojects%2Fdev-large%2Fproject\_storages%2F75%2Fopen&storage\_id=25**_](https://openproject.local/oauth_clients/4262df2b-77bb-49c2-a5df-28355da676d2/ensure_connection?destination_url=https%3A%2F%2Fopenproject.local%2Fprojects%2Fdev-large%2Fproject_storages%2F75%2Fopen&storage_id=25)
* go through the **ensure\_connection** route
* has a **destination\_url** parameter as \`\[openproject\_host\]/project/\[project\_identifier\]/project\_storages/\[project\_storage\_id\]/open
* The waiting modal behavior is triggered only if a storage has been configured in automatic mode for a project.
* If project folder mode is inactive then there is no waiting and redirect to the storage root happens right away.
* If project folder mode is manual then there is no waiting and redirect to the project folder happens right away.
Modal designs: https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/File-Storages-Integration?type=design&node-id=4825-111390&mode=design&t=FTHVfbC7RAmRW9VY-0