skillfed

Clerk Chrome Extension Patterns

This skill covers authentication patterns for Chrome extensions built with Clerk, including popup and side panel UIs, OAuth delegation via syncHost, and service worker token management. Learn which auth methods work in each extension context, configure stable extension IDs, and handle session syncing with your web app.

Clerk Chrome Extension Patterns teaches you to add Clerk authentication to Chrome extensions using popup, side panel, or headless setups.

AI-generated summary based on this skill's SKILL.md

63 4 unlicensed — metadata only updated by clerk

Install

clerk/skills/clerk-chrome-extension-patterns · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/clerk/skills
cp -r skills ~/.claude/skills/clerk-chrome-extension-patterns

generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I add Clerk to a Chrome extension?

Clerk Chrome Extension Patterns provides guidance on integrating Clerk authentication into your Chrome extension. The skill covers popup and side panel UI approaches, OAuth delegation via syncHost, and service worker token management. Start by configuring a stable extension ID, then choose your UI pattern based on whether you need a popup interface or persistent side panel. Clerk handles session syncing between your extension and web app automatically.

What are the best practices for Clerk in Chrome extensions?

Clerk Chrome Extension Patterns teaches architectural best practices including proper OAuth delegation setup, secure token handling in service workers, and session synchronization strategies. Key practices include using syncHost for OAuth flows, managing tokens safely outside the main thread, and aligning your extension's auth state with your web application. The skill emphasizes context-aware auth methods for popup versus side panel UIs.

Which authentication methods work in each Chrome extension context?

Clerk Chrome Extension Patterns explains that different extension contexts require different auth approaches. Popup UIs and side panels have distinct constraints; Clerk's patterns guide you on which methods work best in each. The skill covers OAuth delegation via syncHost as a primary pattern, service worker token management for background operations, and maintaining session state across extension contexts while staying synchronized with your main web app.

How do I configure Clerk extension setup and stable IDs?

Clerk Chrome Extension Patterns covers configuration and setup guidance including how to establish a stable extension ID, which is essential for consistent OAuth redirects and session management. The skill walks through the setup process step-by-step, ensuring your extension ID remains constant across deployments so Clerk can reliably route authentication callbacks and maintain user sessions.

What implementation examples does Clerk provide for extensions?

Clerk Chrome Extension Patterns includes concrete code examples demonstrating popup and side panel authentication flows, OAuth delegation patterns, and service worker token handling. These examples show how to integrate Clerk into real Chrome extensions, handle session syncing with your web app, and implement secure token management. The skill provides working patterns you can adapt to your extension architecture.

How do I handle session syncing between extension and web app?

Clerk Chrome Extension Patterns teaches session synchronization strategies that keep your extension's auth state aligned with your main web application. The skill covers how Clerk automatically syncs sessions, manages token lifecycle in service workers, and handles OAuth flows through syncHost. This ensures users remain authenticated consistently across both your extension and web app without manual session management.

Related skills

Tags

browser-extension-auth identity-integration extension-development authentication-patterns chrome-plugin-guide