How to provide context to Plasmic Studio?

Hi folks, I am struggling with an issues and I assume I miss something about the general concept of Plasmic. Maybe someone can help. In a nextjs project I am using a custom authentication component. On the catchall page I use it like this <Auth><PlasmicRootProvider ...><PlasmicComponent .../></PlasmicRootProvider></Auth> This Auth component reads credentials from env vars, logs into a backend service and provides token information as React context which is used by some custom code components on the pages. Outside of plasmic studio everything works but not in studio. Is this the wrong approach in a Plasmic app`?

Make sure you also add Auth to your Plasmic-host page, surrounding the PlasmicCanvasHost component