You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add data-sandbox-id attribute to embed script snippet (#45)
* feat: add support for data-lk-sandbox-id attribute
Previously, the generated embed popup script didn't work properly
because it might be loaded on an origin where the sandbox id couldn't be
extracted from the url or be otherwise located. This meant that while
this repository could be demo'd effectively, you couldn't really in
practice use the script tag popup embed for anything real.
This change introduces a new data-lk-sandbox-id attribute which can be
specified on the script tag that loads the popup. If set, _this_
sandbox id is used when talking to the sandbox token server endpoint to
get a token rather than attempting to extract it from the URL or
anything like that. Using this mechanism, a embed popup script can be
added to any page and it should always work because the sandbox id is
now being included as part of the embed.
* feat: make popup page dynamic so sandbox id can be included in the generated script tag
* feat: make data-lk-sandbod-id attribute required in all cases going forward
0 commit comments