Skip to content

feat: add isLoggedIn to CozyData when serving app HTML#4722

Closed
Crash-- wants to merge 1 commit intomasterfrom
feat/add-isLoggedIn-to-cozy-data
Closed

feat: add isLoggedIn to CozyData when serving app HTML#4722
Crash-- wants to merge 1 commit intomasterfrom
feat/add-isLoggedIn-to-cozy-data

Conversation

@Crash--
Copy link
Copy Markdown
Contributor

@Crash-- Crash-- commented Apr 3, 2026

Summary

  • Adds an explicit isLoggedIn boolean to the CozyData JSON injected into app HTML via {{.CozyData}}
  • The frontend cannot reliably use the token field to determine authentication state, because token is also populated for share-by-link (sharecode) — isLoggedIn provides an unambiguous signal
  • Updates docs/client-app-dev.md to document the new field

This will help address linagora/twake-drive#3773

Test plan

  • Serve an app while logged in → verify isLoggedIn: true in CozyData
  • Serve an app via share-by-link (sharecode) → verify isLoggedIn: false and token is non-empty
  • Serve an app while not logged in (public route) → verify isLoggedIn: false

🤖 Generated with Claude Code

The frontend cannot reliably use the token field to determine if the
user is logged in, because the token is also populated for
share-by-link. Adding an explicit isLoggedIn boolean to the CozyData
JSON allows the frontend to distinguish between an authenticated user
session and a share-by-link access.

Ref: linagora/twake-drive#3773

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Crash-- Crash-- requested a review from a team as a code owner April 3, 2026 04:34
@Crash-- Crash-- closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant