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
+21-15Lines changed: 21 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,25 @@
1
-
# Metabase Embedding SDK for React sample
1
+
# Metabase embedding SDK for React sample application
2
2
3
3
You'll need a Pro or Enterprise version of Metabase 50 up and running. If you're not sure where to start, sign up for [Pro Cloud](https://www.metabase.com/pricing).
4
4
5
-
> [!IMPORTANT]
6
-
> The SDK is currently only compatible with Metabase 50
5
+
> [!IMPORTANT]
6
+
> The SDK is currently only compatible with Metabase v1.50 or higher
7
+
8
+
## Create `.env` file
7
9
8
-
## Create .env file
9
10
```sh
10
11
cp .env.example .env
11
12
```
12
13
13
14
## Adjust URLs
15
+
14
16
In `.env`, make sure `REACT_APP_METABASE_INSTANCE_URL` and `METABASE_INSTANCE_URL` point to your Metabase instance URL, e.g. `http://localhost:3000`.
15
17
16
18
## Set up your Metabase
17
19
20
+
-[Run Metabase Pro on a Cloud plan (with a free trial)](https://www.metabase.com/pricing)
21
+
- Run Metabase Enterprise Edition locally. This sample app is compatible with [Metabase version v1.50 or higher](https://www.metabase.com/docs/latest/releases). When running locally, you'll need to [activate your license](https://www.metabase.com/docs/latest/paid-features/activating-the-enterprise-edition) to enable SSO with JWT.
22
+
18
23
### Enable SSO with JWT
19
24
20
25
From any Metabase page, click on the **gear** icon in the upper right and select **Admin Settings** > **Settings** > **Authentication**.
@@ -23,56 +28,57 @@ On the card that says **JWT**, click the **Setup** button.
23
28
24
29
### JWT Identity provider URI
25
30
26
-
In **JWT IDENTITY PROVIDER URI** field, paste `localhost:9090/sso/metabase`.
31
+
In **JWT IDENTITY PROVIDER URI** field, paste `localhost:9090/sso/metabase` (or substitute your Cloud URL for localhost).
27
32
28
33
### String used by the JWT signing key
29
34
30
-
Click the **Generate key** button. Copy the key and paste it in your `.env` file into the env var `METABASE_JWT_SHARED_SECRET`.
35
+
Click the **Generate key** button. Copy the key and paste it in your `.env` file into the env var `METABASE_JWT_SHARED_SECRET`.
31
36
32
37
## Running the server
33
38
34
-
### Move into the directory
39
+
Change into the `server`directory:
35
40
36
41
```sh
37
42
cd server
38
43
```
39
44
40
-
### Install packages
45
+
Install packages:
41
46
42
47
```sh
43
48
npm install
44
49
```
45
50
46
-
### Starting the server
51
+
Start the server:
47
52
48
53
```sh
49
54
npm start
50
55
```
51
56
52
57
## Start the client
53
58
54
-
### Move into the directory
59
+
In a different terminal, change into the `client`directory:
55
60
56
-
In a different terminal
57
61
```sh
58
62
cd client
59
63
```
60
-
### Install dependencies
64
+
65
+
Install dependencies:
61
66
62
67
```sh
63
68
npm install
64
69
```
65
70
66
-
### Start the app
71
+
Start the client app:
67
72
68
73
```sh
69
74
npm start
70
75
```
71
-
Your browser should automatically open the app. By default, it runs on [http://localhost:3100](localhost:3100).
76
+
77
+
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100).
72
78
73
79
## Set up groups and data sandboxing
74
80
75
-
Check out our [quick start guide](https://www.metabase.com/learn/customer-facing-analytics/interactive-embedding-quick-start) to set up interactive embedding with JWT and data sandboxing.
81
+
To set up interactive embedding with JWT and data sandboxing, check out our [quick start guide](https://www.metabase.com/learn/customer-facing-analytics/interactive-embedding-quick-start).
0 commit comments