
Setup Flows Auth
Set up Flows auth for React apps by detecting the classic or Apps API flow from app.json.
- CCM score
- 66 of 100
- skills.sh installs
- 1.9K
- GitHub stars
- 6
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers both auth flows, choosing Apps API or classic from the
infrafield inapp.json, and no-ops when valid auth is already wired - Installs the flow-specific packages (
@cognite/duneor@cognite/app-sdk, plus@cognite/sdk,@tanstack/react-query, andvite-plugin-mkcert) using the detected package manager - Configures Vite with
base: "./",mkcert(), andfusionOpenPlugin(), withmanifestCspPlugin()required first for Apps API - Designed for migrating existing React apps to Flows or adding auth where no Flows provider is wired up
Install
$ npx -y skills add cognitedata/builder-skills --skill setup-flows-auth -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Set Up Flows Authentication
Wire a React app for Flows 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/cli@latest apps create.
Step 1 — Read state, decide whether to act
Read package.json, src/main.tsx (or src/index.tsx), vite.config.ts, app.json.
A valid setup already exists if any of these is true — in which case do nothing and report no-op:
- Classic:
<DuneAuthProvider>from@cognite/dunewraps<App />in the entry file. - Apps API, provider pattern:
<CogniteSdkProvider>from@cognite/app-sdk/reactwraps the app (inApp.tsxormain.tsx), and nested components consume the client viauseCogniteSdk(). Requires@cognite/app-sdk >= 0.5.1.
Details
- Repository
- github.com/cognitedata/builder-skills
- Categories
- Frontend & UI Code, Backend & APIs
- First seen
- Jun 3, 2026
More from cognitedata/builder-skills
All 25- Performance1.9K
- Create Client Tool1.9K
- Pull Changes Resolve Conflicts1.9K
- Use Topbar1.9K
- Migrate App To Flows1.7K
- Integrate Fusion Agent1.7K
- Flows Code Review1.6K
- Flows Design Review1.1K
- Flows App Brief1.1K
- Flows External App Submit1.1K
- Skill Creator2.5K
- Code Quality2K
- Test Coverage1.9K
- Dependencies Audit1.9K
- Reveal 3d1.9K
- Design1.9K
- Integrate Todo List1.9K
- Correctness And Error Handling1.9K
- Dm Limits And Best Practices1.9K
- Integrate Atlas Chat1.9K
- Security1.9K
- Integrate File Viewer1.9K
- Setup Python Tools1.9K
- Graph Viewer1.9K
Similar to Setup Flows Auth
More Frontend & UI Code
migrate-app-to-flowscognitedata/builder-skills1.7K installsStep-by-step migration of a legacy Dune app to Flows app hosting, with auth, manifest, and deploy updates.
clerk-setupclerk/skills60.6K installsAdd Clerk authentication to a project with the Clerk CLI and official framework quickstarts.
neon-authneondatabase/ai-rules266 installsSets up Neon Auth in Next.js, React SPA, or Node.js projects with auth routes and UI components.
create-authbetter-auth/skills29.3K installsInteractive scaffolding guide that plans and implements Better Auth in TypeScript/JavaScript apps before writing any code.
better-auth-best-practicesbetter-auth/skills133.9K installsComplete Better Auth setup covering server, client, database adapters, sessions, and security configuration.