diff --git a/docs/references/embedding.mdx b/docs/references/embedding.mdx index e387998..5016c8d 100644 --- a/docs/references/embedding.mdx +++ b/docs/references/embedding.mdx @@ -200,7 +200,7 @@ Clicking `generate & copy url` will generate an embed URL based on the configura You can embed this one-off URL directly into your application, but you will manually need to update the URL each time the embed URL expires. Alternatively, you can add the [`code snippet`](#code-snippet) to your app to automatically generate embed URLs in your application. -## Code snippet +## Code snippet & demo Although you can generate URLs directly from Lightdash with a long expiration, it is recommended to generate your own JWT embed tokens in your backend with a short expiration using your `secret` to make sure people can't be using embed URLs outside your app. @@ -213,6 +213,35 @@ To make this easier to integrate, we included some code snippets you can copy an style={{ display: 'block', margin: '0 auto 20px auto' }} /> +Here is a demo of how to add the code snippet to your app: + +