setup-dune-auth
Installation
SKILL.md
Set Up Dune Authentication
Wire a React app for Dune auth so it can talk to CDF inside Fusion. Two flows exist; pick one based on app.json.
Pick the flow
Read app.json if present:
app.json infra |
Flow | Auth source | Extra package |
|---|---|---|---|
"appsApi" |
Apps API (new Fusion app host) | connectToHostApp from @cognite/app-sdk |
@cognite/app-sdk |
| missing / other | Classic (legacy Files API) | DuneAuthProvider + useDune() from @cognite/dune |
— |
No app.json? Ask the user. Default to Apps API — it's the default for npx @cognite/dune create.
Step 1 — Read state, decide whether to act
Read package.json, src/main.tsx (or src/index.tsx), vite.config.ts, app.json.