|
| 1 | +# Metabase Node.js Interactive Embedding Sample |
| 2 | + |
| 3 | +This is the sample code for the Metabase Node.js Interactive Embedding Quickstart. |
| 4 | + |
| 5 | +Please check out the code for an example of how to integrate interactive embedding into your Node.js applications. |
| 6 | + |
| 7 | +## What is Metabase? |
| 8 | + |
| 9 | +## Running the sample code |
| 10 | +1. Make sure you have updated enabled JWT for SSO under admin settings, and you have entered your app's SSO endpoint as the JWT Identity Provider URI. The path is `/sso/metabase`, e.g. `http://localhost:8080/sso/`metabase |
| 11 | +2. Make sure you define the following env vars defined: |
| 12 | +** `export METABASE_SITE_URL="https://myapp.metabaseapp.com"` - the root path of your Metabase instance, |
| 13 | +** `export METABASE_JWT_SHARED_SECRET="COPY_SECRET_FROM_JWT_CONFIG"` - you grab this from the SSO JWT config in admin settings |
| 14 | +3. Create a dashboard using X-ray on the invoices table in the sample dataset. If the ID is not 1, then update `METABASE_DASHBOARD_PATH` in `index.js`. |
| 15 | +3. Start the sample with `node index.js`. It runs by default on port 8080. |
| 16 | +4. Hit http://localhost:8080, sign in and hit `/analytics` with both users to populate them to Metabase. |
| 17 | +5. Create groups `Customer Acme` and `Customer Fake` and configure permissions so they can access the collection in which the dashboard is located. Also, setup data sandboxing on the Invoices table filtering on `accountId`. |
| 18 | +6. Under SSO then activate group membership syncing and map `Customer-Acme` and `Customer-Fake` to the groups you've created. |
| 19 | +7. You should be able to sign in with the two users and see the dashboard. If not, check the collection permissions for their respective groups. |
| 20 | +8. Both users should be able to see the same dashboard but with different data, beacuse of sandboxing. |
| 21 | + |
| 22 | +## Create a free Metabase trial |
| 23 | + |
| 24 | +* For interactive embedding, you will need a Pro or Enterprise plan. |
| 25 | +* You can sign up for a free trial at https://store.metabase.com/checkout |
| 26 | + |
| 27 | +## Reporting issues |
| 28 | + |
| 29 | +Please report bugs or feature requests as issues in this reporsitory. Please do not report security vulnerabilities on the public GitHub issue tracker. Our Security Policy describes [the procedure](https://github.com/metabase/metabase/security#reporting-a-vulnerability) for disclosing security issues. |
| 30 | + |
| 31 | +## Author |
| 32 | + |
| 33 | +[Metabase](https://metabase.com) |
| 34 | + |
| 35 | +## License |
| 36 | + |
| 37 | +This project is licensed under the MIT license. See the [LICENSE](./LICENSE) file for more info. |
0 commit comments