Hello,
I was able to reproduce this error by using an invalid host value and setting forceRedirect to false.
I think we have a couple things going on here:
We don’t recommend handling the host encoding on your own. You should be able to get it from the location on the iFrame. So something like this:
const host = new URLSearchParams(window.location.search).get('host')
We also want forceRedirect to be true so the app can go through the auth process within Admin. We have the option of turning it off for debugging or if you want to insert some additional operations, but then your app would be responsible for redirecting back to the auth flow.
I’m not sure what value this returns…
let host = btoa('{{ Auth::user()->name }}');
… but I suspect, like mentioned in the responses below, that it’s missing /admin at the end. If you get the host from the iframe query params and set forceRedirect to true, things should work!