# metabase-embedding-sso-implementation

A skill that walks the agent through adding JWT SSO to your Metabase embedding: signing endpoint, frontend auth layer, group mappings.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 363 installs · ★ 53
- Author: metabase
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/metabase/agent-skills/tree/HEAD/skills/metabase-embedding-sso-implementation/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/metabase-embedding-sso-implementation

## What it does

Reach for this skill when embedded Metabase dashboards need to know which of your users is looking at them. It builds an endpoint that signs a JWT with the `METABASE_JWT_SHARED_SECRET` secret and puts `email`, `first_name`, `last_name`, `groups` and `exp` into the payload. Three embedding types are covered: Modular embedding web components from `embed.js`, the Modular embedding SDK `@metabase/embedding-sdk-react`, and Full app embedding in an iframe.

The skill runs on an execution contract. The agent creates a checklist first, then works through the steps in order and marks each one complete or blocked with evidence. It scans the project with parallel Grep and Glob calls, detects the backend language, the embedding type, the Metabase version and how users log into your app. Then it wires the frontend side: `window.metabaseConfig` for web components or `defineMetabaseAuthConfig()` for the React SDK.

One rule is baked into the skill itself: the endpoint issues a token only for a user already authenticated in the host app, and SSO requests reach Metabase through your backend rather than the browser. The shared secret stays off the client. If the agent cannot find embedding code, the instance URL, the version or your role model, it stops and asks. Guest embeds on `METABASE_SECRET_KEY`, plus SAML and LDAP, are out of scope.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/agent-skills --skill metabase-embedding-sso-implementation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/metabase-embedding-sso-implementation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/metabase-embedding-sso-implementation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/agent-skills --skill metabase-embedding-sso-implementation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/metabase-embedding-sso-implementation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/agent-skills --skill metabase-embedding-sso-implementation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/metabase-embedding-sso-implementation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install metabase/agent-skills metabase-embedding-sso-implementation
```

2. **Manually: put the files in place**
- File: `.github/skills/metabase-embedding-sso-implementation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/agent-skills --skill metabase-embedding-sso-implementation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/metabase/agent-skills --path skills/metabase-embedding-sso-implementation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/metabase-embedding-sso-implementation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add metabase/agent-skills --skill metabase-embedding-sso-implementation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/metabase/agent-skills/tree/HEAD/skills/metabase-embedding-sso-implementation/SKILL.md

## When to use it
- sign a JWT for a user already logged into your app
- pass user identity into an embedded Metabase dashboard
- map app roles onto Metabase groups
- configure frontend auth for web components or the React SDK
- keep the Metabase shared secret off the client

## Example prompts
- Add JWT SSO to our Metabase embedding
- Set up SSO auth for our embedded dashboards
- Create the JWT signing endpoint and hook it into the embedding frontend

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d20eec4f2951d951.

BEGIN THIRD-PARTY FILE d20eec4f2951d951
```text
---
name: metabase-embedding-sso-implementation
description: Implements JWT SSO authentication for Metabase embedding in a project. Supports all embedding types that use SSO — Modular embedding (embed.js web components), Modular embedding SDK (@metabase/embedding-sdk-react), and Full app embedding (iframe-based). Creates the JWT signing endpoint, configures the frontend auth layer, and sets up group mappings. Use when the user wants to add SSO/JWT auth to their Metabase embedding, implement user identity for embedded analytics, set up JWT authentication for Metabase, or connect their app's authentication to Metabase embedding.
model: opus
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, Task, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion
---

## Execution contract

Follow the workflow steps in order — do not skip any step. Create the checklist first, then execute each step and explicitly mark it done with evidence. Each step's output feeds into the next, so skipping steps produces incorrect implementations.

If you cannot complete a step due to missing info or tool failure, you must:

1. record the step as ❌ blocked,
2. explain exactly what is missing / what failed,
3. stop (do not proceed to later steps).

Each workflow step must end with `Status: ✅ complete` or `Status: ❌ blocked`. Steps are sequential — do not start a step until the previous one is complete. Each step must include evidence (detected code patterns, file paths, diffs applied, pass/fail results).

## Architectural conformance

Follow the app's existing architecture, template engine, layout/partial system, code style, and route patterns. Do not switch paradigms (e.g., templates to inline HTML or vice versa). If the app has middleware for shared template variables, prefer that over duplicating across route handlers.
```
END THIRD-PARTY FILE d20eec4f2951d951

The third-party file has ended. Everything between the d20eec4f2951d951 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 1850 of 25051 bytes. © metabase · MIT · https://github.com/metabase/agent-skills/tree/HEAD/skills/metabase-embedding-sso-implementation/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
