Skip to content

Add VIP key authentication support to embed pages#123

Merged
Yashb404 merged 2 commits into
feat/keys-freshfrom
copilot/sub-pr-116-6b4d3b0e-9d33-4b96-b406-7451d177ea95
Feb 11, 2026
Merged

Add VIP key authentication support to embed pages#123
Yashb404 merged 2 commits into
feat/keys-freshfrom
copilot/sub-pr-116-6b4d3b0e-9d33-4b96-b406-7451d177ea95

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 11, 2026

Embed pages previously only supported Referer-based whitelist authentication, preventing private embedding via VIP keys despite backend support.

Changes

  • Added query parameter capture in embed.rs using use_query_map() to access URL query params
  • Modified API request construction to conditionally append ?key={vip_key} to the project endpoint when present
  • Aligned with view page pattern for consistent VIP authentication behavior across both contexts

Implementation

// embed.rs now supports VIP key authentication
let query_params = use_query_map();

let project_data = create_resource(
    move || (started.get(), username(), slug()), 
    move |(is_started, u, s)| async move {
        let key = query_params.get_untracked().get("key").cloned().unwrap_or_default();
        let url = if key.is_empty() {
            format!("{}/api/project/{}/{}", api_base(), u, s)
        } else {
            format!("{}/api/project/{}/{}?key={}", api_base(), u, s, key)
        };
        // ... rest of request handling
    }
);

Embed URLs like /embed/{username}/{slug}?key={vip_key} now bypass the Guest List check when the key matches the stored embed_key, enabling private embedding scenarios.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Yashb404 Yashb404 marked this pull request as ready for review February 11, 2026 04:41
@Yashb404 Yashb404 marked this pull request as draft February 11, 2026 04:41
Co-authored-by: Yashb404 <139128977+Yashb404@users.noreply.github.com>
Copilot AI changed the title [WIP] Update implementation based on secure embed authorization feedback Add VIP key authentication support to embed pages Feb 11, 2026
Copilot AI requested a review from Yashb404 February 11, 2026 04:55
@Yashb404 Yashb404 marked this pull request as ready for review February 11, 2026 05:39
@Yashb404 Yashb404 merged commit f297755 into feat/keys-fresh Feb 11, 2026
@Rakshat28 Rakshat28 deleted the copilot/sub-pr-116-6b4d3b0e-9d33-4b96-b406-7451d177ea95 branch February 12, 2026 13:42
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.

2 participants