looker-open-source / embed-sdk

The Looker browser embedding SDK
MIT License
72 stars 47 forks source link

Unable to generateTokens with correct body when using a CookielessRequestInit resource #147

Open cgooding-va opened 1 year ago

cgooding-va commented 1 year ago

In generateTokens, when a string resource is specified, it will build a body for the request here that includes the private _cookielessApiToken and _cookielessNavigationToken tokens.

However, if a CookielessRequestInit resource is used instead (as I wish to do as I would like to include an Authorization header on my request), these tokens are not injected into the body. There's no real way to inject them myself as they are currently private and I have to build the request during the embed init anyways.