Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy Docs to GitHub Pages

on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: 'docs/pnpm-lock.yaml'

- name: Install dependencies
working-directory: docs
run: pnpm install

- name: Build
working-directory: docs
run: pnpm build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/out

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: deploy-pages@v4

64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Build and Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint

- name: Type check
run: pnpm type-check

- name: Test
run: pnpm test

- name: Build
run: pnpm build

- name: Get version from package.json
id: package_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Create extension zip
run: |
cd dist
zip -r ../auth-header-injector-${{ steps.package_version.outputs.version }}.zip .
cd ..

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: auth-header-injector-${{ steps.package_version.outputs.version }}.zip
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

10 changes: 2 additions & 8 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Get staged files
files=$(git diff --cached --name-only --diff-filter=ACMR "*.ts" "*.tsx" "*.js" "*.jsx" | xargs)

if [ -n "$files" ]; then
echo "Running Biome on staged files: $files"
pnpm lint-staged $files
git add $files
fi
# Run linting (same as CI)
pnpm lint

# Run TypeScript type check
pnpm type-check
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

A Chrome extension that automatically injects authentication headers into HTTP requests based on URL patterns. Built for developers who need to test APIs with different auth tokens across multiple environments.

[![CI](https://github.com/prosdevlab/auth-header-injector/actions/workflows/ci.yml/badge.svg)](https://github.com/prosdevlab/auth-header-injector/actions/workflows/ci.yml)
![Chrome Version](https://img.shields.io/badge/chrome-v114+-blue)
![License](https://img.shields.io/badge/license-MIT-green)
[![SDK Kit](https://img.shields.io/badge/built_with-SDK_Kit-purple)](https://github.com/lytics/sdk-kit)

## Features

Expand All @@ -16,11 +18,17 @@ A Chrome extension that automatically injects authentication headers into HTTP r

## Installation

### From Chrome Web Store

> 🚀 **Coming Soon** - Extension is currently in review for Chrome Web Store

Once published, you'll be able to install directly from the Chrome Web Store.

### From Source

1. **Clone the repository**
```bash
git clone https://github.com/yourusername/auth-header-injector.git
git clone https://github.com/prosdevlab/auth-header-injector.git
cd auth-header-injector
```

Expand Down Expand Up @@ -184,6 +192,33 @@ src/
- ✅ **Request debouncing** - Duplicate requests ignored for 1s
- ✅ **Event-driven UI** - Updates via `chrome.storage.onChanged`, no polling

## Security & Privacy

### Data Storage

- **All data is stored locally** on your device using Chrome's sync storage
- **No external servers** - No data is transmitted to any third-party services
- **No analytics or tracking** - We don't collect any usage data
- **Open source** - Full code transparency for security auditing

### Token Security

- Tokens are stored in Chrome's encrypted sync storage
- Never logged or transmitted except to your configured domains
- Visible only when you explicitly choose to show them
- Synced securely across your Chrome instances (if Chrome sync is enabled)

### Permissions Explained

We require these permissions for core functionality:

- `declarativeNetRequest` - Inject authentication headers into matching requests
- `storage` - Store your rules and tokens locally
- `tabs` - Detect current page URL for context-aware UI
- `sidePanel` - Display the extension interface
- `webRequest` - Track request statistics (counts only, no content)
- `host_permissions (<all_urls>)` - Allow header injection on domains you configure

## API & Permissions

### Required Permissions
Expand Down Expand Up @@ -377,9 +412,15 @@ We use [Conventional Commits](https://www.conventionalcommits.org/):

MIT License - see [LICENSE](LICENSE) for details

## Support

- **Issues:** [GitHub Issues](https://github.com/prosdevlab/auth-header-injector/issues)
- **Discussions:** [GitHub Discussions](https://github.com/prosdevlab/auth-header-injector/discussions)
- **Repository:** [github.com/prosdevlab/auth-header-injector](https://github.com/prosdevlab/auth-header-injector)

## Acknowledgments

- [SDK Kit](https://github.com/yourusername/sdk-kit) - Plugin architecture
- [SDK Kit](https://github.com/lytics/sdk-kit) - Plugin architecture for Chrome extensions
- [Shadcn UI](https://ui.shadcn.com/) - Component library
- [Lucide Icons](https://lucide.dev/) - Icon set
- [Chrome Extensions Docs](https://developer.chrome.com/docs/extensions/) - API reference
Expand All @@ -388,3 +429,5 @@ MIT License - see [LICENSE](LICENSE) for details

**Built with ❤️ for developers who live in the browser**

**Free & Open Source** • MIT License • [ProsDevLab](https://github.com/prosdevlab)

2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", "dist", "coverage"]
"ignore": ["node_modules", "dist", "coverage", "docs/.next", "docs/out"]
},
"formatter": {
"enabled": true,
Expand Down
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
node_modules/

# Next.js
.next/
out/

# Build output
*.tsbuildinfo

# TypeScript
next-env.d.ts

# Logs
*.log
npm-debug.log*

# OS
.DS_Store

23 changes: 23 additions & 0 deletions docs/app/[[...mdxPath]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { useMDXComponents } from 'nextra-theme-docs';
import { generateStaticParamsFor, importPage } from 'nextra/pages';

export const generateStaticParams = generateStaticParamsFor('mdxPath');

export async function generateMetadata(props: { params: Promise<{ mdxPath?: string[] }> }) {
const params = await props.params;
const { metadata } = await importPage(params.mdxPath);
return metadata;
}

export default async function Page(props: { params: Promise<{ mdxPath?: string[] }> }) {
const params = await props.params;
const result = await importPage(params.mdxPath);
const { default: MDXContent, ...rest } = result;
const { wrapper: Wrapper } = useMDXComponents();

return (
<Wrapper {...rest}>
<MDXContent />
</Wrapper>
);
}
4 changes: 4 additions & 0 deletions docs/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root {
--nextra-primary-hue: 263deg;
--nextra-primary-saturation: 70%;
}
44 changes: 44 additions & 0 deletions docs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Footer, Layout, Navbar } from 'nextra-theme-docs';
import { Head } from 'nextra/components';
import { getPageMap } from 'nextra/page-map';
import 'nextra-theme-docs/style.css';
import './globals.css';

export const metadata = {
title: {
default: 'Auth HI!',
template: '%s | Auth HI!',
},
description:
'Chrome extension for injecting authentication headers into requests. Say hi to hassle-free auth headers.',
};

const logo = (
<span style={{ fontWeight: 'bold' }}>
<span style={{ color: '#7c3aed' }}>Auth</span> <span style={{ color: '#10b981' }}>HI!</span>
</span>
);

export default async function RootLayout({ children }: { children: React.ReactNode }) {
const pageMap = await getPageMap();

return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<Head faviconGlyph="🔐" />
<body>
<Layout
pageMap={pageMap}
docsRepositoryBase="https://github.com/prosdevlab/auth-header-injector/tree/main/docs/content"
editLink="Edit this page on GitHub"
sidebar={{ defaultMenuCollapseLevel: 1 }}
navbar={
<Navbar logo={logo} projectLink="https://github.com/prosdevlab/auth-header-injector" />
}
footer={<Footer>MIT {new Date().getFullYear()} © prosdevlab</Footer>}
>
{children}
</Layout>
</body>
</html>
);
}
7 changes: 7 additions & 0 deletions docs/content/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
index: 'Home',
'getting-started': 'Getting Started',
guide: 'Guide',
privacy: 'Privacy Policy',
support: 'Support',
};
Loading