feat: Cozy App integration for Token Manager#10
Open
mmaudet wants to merge 22 commits intofeat/token-managerfrom
Open
feat: Cozy App integration for Token Manager#10mmaudet wants to merge 22 commits intofeat/token-managerfrom
mmaudet wants to merge 22 commits intofeat/token-managerfrom
Conversation
Convert Token Manager frontend to native Cozy App: - Dual mode (Next.js + Cozy App coexist) - create-cozy-app with React Router hash routing - Cozy token → silent OIDC exchange - Deploy via patcher-cozy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Scaffolding (create-cozy-app + auth + router), component adaptation, and Cozy Stack deployment integration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e React Router) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…onents Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build output verified: build/index.html, build/app.597fa1ec.js, build/manifest.webapp Webpack compiled with 3 warnings (only bundle size warnings, no errors). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comprehensive documentation covering: - Functional overview (users, admins, developers) - Architecture and data model - Umbrella token concept and proxy flow - Service connectors (OIDC, custom OAuth, Matrix SSO) - Security model (encryption, hashing, PKCE, audit) - Getting started guide with curl examples - Full API reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…omain - Webpack: use automatic JSX runtime (no need for import React) - Auth: auto-detect username from hostname (user1-token-manager → dev-user1) - Fallback to dev-token when iframe silent OIDC is blocked by CSP Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without this, the Cozy App cannot fetch from the Token Manager API due to Content Security Policy blocking cross-origin requests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace placeholder SVG with the API gear icon provided by user. Update manifest.webapp and webpack to use icon.png. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nstances Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ger in Cozy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… template Cozy Stack replaces these placeholders at serve time to inject the cozy-bar scripts and theme CSS. This enables the top navigation bar matching other Cozy apps like Drive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cozy apps use SVG icons (like Drive's assets/app-icon.svg). Converted PNG to SVG with embedded base64 image for compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Orange square now fills from (2,2) to (62,62) instead of (10,10) to (54,54). Added width="256" height="256" for explicit size hint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cozyURL Match Twake Chat/Drive pattern: pass appNamePrefix='Twake', appSlug, cozyURL, and token for proper bar rendering with app grid and user avatar. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ettings) The cozy-bar needs GET access to io.cozy.apps (app grid), io.cozy.contacts (user avatar), io.cozy.oauth.clients, and io.cozy.settings to render the full navigation bar with app grid and user avatar like Drive/Chat. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…o-detect priority - Auth: prioritize real Cozy token over dev-token - Extract username from Cozy domain (user1.twake.local → user1) for API auth - cozy-bar init: derive cozyURL from instance domain, add appEditor - Remove aggressive dev-token auto-detect from hostname Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts the Token Manager frontend into a native Cozy App that runs inside Cozy Stack, alongside the existing Next.js standalone frontend (dual mode).
What's included
frontend-cozy/— Cozy App with Webpack, React 18, React Router 6, cozy-barTest plan
cd token_manager/frontend-cozy && npm run build/etc/hosts:127.0.0.1 user1-token-manager.twake.localdocker exec cozyt cozy-stack apps install --domain user1.twake.local token-manager file:///data/cozy-app/token-managerhttps://user1-token-manager.twake.local/🤖 Generated with Claude Code