LookerEmbedSDK '/auth' endpoint gives CORS error when other requests to same endpoint don't

I'm trying to use the LookerEmbedSDK to embed dashboards.

 

 

LookerEmbedSDK.init(LOOKER_USE_EMBED_DOMAIN,
        {
          url: `MYURL/auth`,
          headers: [
            {name:'authorization', value:`Bearer ${getStorageToken()}`},
            {name: "Content-Type", value:"text/xml"},
          ],
          withCredentials: true
        })
const lookerEmbedSDKResponse = await LookerEmbedSDK
        .createDashboardWithId(currentDashboard.dashboardId)
        .appendTo(el)
        .withParams({_theme: "{\"show_filters_bar\":false}"})
        .withFilters(currentFilters)
        .build()
        .connect()
        .catch((error) => {
          console.error("An unexpected error occurred", error);
        });

 

 

But I consistently get

 

 

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'send')

 

 

 

Which is occurring in embed.ts:253

 

In my network tab I see this is a CORS error (I also see that I have properly set the Authorization token)

The thing is - other requests to that same endpoint (via Curl or axios) work and do not give me an error, they give me what I expect.  What's going on with the Embed auth call logic?

 

0 1 37
1 REPLY 1

Just to clarify, the request to the auth endpoint is indeed failing?

If so most CORS errors are related to the service being called (server side code, payload issue, etc.), in this case the endpoint url of the Embed URL SSO signing process. I assume there is some difference in the request payload when issued via the Embed SDK compared to what is being done manually from Curl or axios.

Do you have logging on the endpoint being called? If so, any errors on the server side that are more descriptive?