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
Copy file name to clipboardExpand all lines: README.md
+31-8Lines changed: 31 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Airbyte Embedded Widget
2
2
3
-
A lightweight, embeddable widget for integrating Airbyte's data synchronization capabilities into your application.
3
+
An embeddable widget for integrating Airbyte's data synchronization capabilities into your application.
4
4
5
5
## Features
6
6
@@ -34,7 +34,7 @@ pnpm install
34
34
pnpm dev
35
35
```
36
36
37
-
The demo server will start at `https://localhost:3000`. You may need to accept the self-signed certificate warning in your browser.
37
+
The demo server will start at `https://localhost:3003`. You may need to accept the self-signed certificate warning in your browser.
38
38
39
39
## Building the Library
40
40
@@ -48,15 +48,34 @@ The built files will be in the `dist` directory.
48
48
49
49
## Usage
50
50
51
+
To use this library, you will first need to fetch an Airbyte Embedded token. You should do this in your server, though if you are simply testing this locally, you can use:
`AIRBYTE_BASE_URL`: where your Airbyte instance is deployed
64
+
`CUSTOMER_WORKSPACE_ID`: the workspace you have associated with this customer
65
+
`EMBEDDING_ORIGIN` here refers to where you are adding this widget to. It will be used to generate an `allowedOrigin` parameter for the webapp to open communications with the widget. If you are running the widget locally using our demo app, the allowed origin should be `https://localhost:3003`, for example.
66
+
67
+
You can also, optionally, send an `externalUserId` in your request and we will attach it to the jwt encoded within the Airbyte Embedded token for provenance purposes.
68
+
69
+
Embedded tokens are short-lived (15-minutes) and only allow an end user to create and edit Airbyte source configurations within the workspace you have created for them.
70
+
71
+
These values should be passed to where you initializze the widget like so:
Copy file name to clipboardExpand all lines: demo/README.md
+24-12Lines changed: 24 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,25 +18,37 @@ This is a demo application showcasing the usage of the Airbyte Embedded Widget.
18
18
pnpm install
19
19
```
20
20
21
-
2. Create a `.env` file in this directory with the following:
21
+
2. Fetch embedded token
22
+
23
+
To use this library, you will first need to fetch an Airbyte Embedded token. You should do this in your server, though if you are simply testing this locally, you can use:
`AIRBYTE_BASE_URL`: where your Airbyte instance is deployed
36
+
`CUSTOMER_WORKSPACE_ID`: the workspace you have associated with this customer
37
+
`EMBEDDING_ORIGIN` here refers to where you are adding this widget to. It will be used to generate an `allowedOrigin` parameter for the webapp to open communications with the widget. If you are running the widget locally using our demo app, the allowed origin should be `https://localhost:3003`, for example.
32
38
33
-
Start the development server:
39
+
You can also, optionally, send an `externalUserId` in your request and we will attach it to the jwt encoded within the Airbyte Embedded token for provenance purposes.
34
40
35
-
```bash
36
-
pnpm dev
41
+
Embedded tokens are short-lived (15-minutes) and only allow an end user to create and edit Airbyte source configurations within the workspace you have created for them.
42
+
43
+
3. Create a `.env` file in the `/demo` directory:
44
+
45
+
```env
46
+
VITE_AB_EMBEDDED_TOKEN=""
37
47
```
38
48
39
-
The server will start at `https://localhost:3000`. You may need to accept the self-signed certificate warning in your browser.
49
+
You can fetch an Airbyte Embedded token using the curl request example above.
50
+
51
+
4. Run the demo app using `pnpm dev` and access a very simple example UI at `https://localhost:3003` in your browser.
0 commit comments