kontent-ai / sample-app-react

Sample React SPA utilizing the Kontent.ai Delivery API to fetch content.
https://kontent-sample-app-react.netlify.app/
MIT License
51 stars 73 forks source link

Cannot leave configuration in web spotlight #219

Open JiriLojda opened 1 year ago

JiriLojda commented 1 year ago

Brief bug description

When I open the sample app in the web spotlight, I can't leave the configuration page. Submitting the form doesn't work, because the cookie is not accessible to the page in the iframe. You need to set the SameSite=None;Secure policy. See https://kontent.ai/learn/tutorials/develop-apps/build-strong-foundation/set-up-preview/#a-set-up-preview-for-web-spotlight

Repro steps

  1. Set the deployed sample app's URL as a preview URL and enable web spotlight.
  2. Open web spotlight
  3. Set your projectID and submit the form.
  4. The app still doesn't open (you stay on the configuration page)

Expected behavior

The app should open the homepage route with the project id in a cookie.

Test environment