contentful / apps

Apps on the Contentful Marketplace and resources to build them
https://contentful.com/marketplace
136 stars 147 forks source link

Bynder app Authentication issue #1645

Open vitalbone opened 2 years ago

vitalbone commented 2 years ago

Describe the bug There's an issue with the Contentful Bynder app. The correct Bynder environment is not persisted across Contentful environments in the same Contentful space. Looks like it’s not respecting the env configurations.

The issue occurs when logging into Bynder via the modal—by clicking on the “Select a file on Bynder” button—the user session is persisted across environments if a user changes Contentful environments. This results in the Bynder app potentially looking for assets in the Bynder production asset dam when in the Contentful development environment and vice-versa. I’ve logged a ticket with Bynder.

To Reproduce Steps to reproduce the behavior:

  1. Contentful space A + env A: Go to the Bynder app config, add your production Bynder URL
  2. Contentful space A + env B: Go to the Bynder app config, add your development Bynder URL
  3. Contentful space A + env A: Open a content entry and scroll to the Bynder app field
  4. Contentful space A + env A: Click the "Select a file on Bynder" button
  5. Contentful space A + env A: Log into the production Bynder env
  6. Contentful space A + env A: See the assets from the production Bynder env
  7. Contentful space A + env B: Swap to Contentful env B (in the same space)
  8. Contentful space A + env B: Open a content entry and scroll to the Bynder app field
  9. Contentful space A + env B: Click the "Select a file on Bynder" button
  10. Contentful space A + env B: Notice the assets are still coming from the production Bynder app. Even though the app config should says it should come from the development Bynder env

Expected behavior A user should be able to see the assets in the Bynder environment that corresponds to the Contentful environment.

Screenshots

Screen Shot 2022-08-23 at 11 23 27 am Screen Shot 2022-08-23 at 11 23 09 am Screen Shot 2022-08-23 at 10 48 45 am Screen Shot 2022-08-23 at 10 49 47 am

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

kdamball commented 2 years ago

Hi @vitalbone, thanks for a great issue report. We included this issue in our team's backlog but I cannot promise about fix dates. We will add a comment when we have fixed it.

vitalbone commented 2 years ago

Thanks @kdamball - feel free to reach out if you have any questions when you (eventually/hopefully 🤞) get to it :)