Skip to content

Remove obsolete auth token handling after gateway sandbox deployment #113

@sanity

Description

@sanity

Context

freenet/freenet-core#3254 adds iframe sandbox isolation to the Freenet gateway. The gateway now handles auth token injection transparently via a postMessage bridge, so River no longer needs to read or pass the auth token itself.

What to remove

  1. get_auth_token_from_window() in ui/src/components/app.rs (~line 222-243) — reads window.__FREENET_AUTH_TOKEN__ which is no longer injected. Now always returns None.

  2. Manual authToken URL parameter appending in ui/src/components/app/freenet_api/connection_manager.rs (~line 42-55) — the gateway bridge injects the token automatically. This code path is now a no-op since the token is always None.

  3. localStorage usage for invitations, notifications, and migration flags — sandboxed iframes have an opaque origin with no localStorage access. These should migrate to Freenet delegates or be removed if no longer needed.

  4. BroadcastChannel multi-tab detection — won't work across opaque origins. Consider whether this feature is still needed or can use an alternative mechanism.

When

After freenet-core 0.1.149+ (with the sandbox fix) is deployed and confirmed working.

Related

[AI-assisted - Claude]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions