A Chrome extension that automatically clicks the "Authorize" button on the Claude Code OAuth page (claude.ai/oauth/*).
When Claude Code opens a browser tab for OAuth authorization, this extension detects it, focuses the tab, and clicks the Authorize button for you — so you don't have to switch windows and click manually.
- background.js — Watches for OAuth tabs loading, focuses the window/tab, and signals the content script to click.
- content.js (MAIN world) — Finds the Authorize button and clicks it using multiple strategies: standard click, full mouse event sequence, and direct React internals as a fallback. Also auto-clicks when the window receives focus.
- content-isolated.js (ISOLATED world) — Bridges messages from the background service worker to the MAIN world content script via
CustomEvent.
-
Clone this repo to a folder on your computer. Open a terminal and run:
cd ~/Documents git clone https://github.com/danbuhler/claude-code-auto-authorize.git
This creates a folder called
claude-code-auto-authorizeinside~/Documents. You can pick any folder you like — just remember where you put it, because Chrome will need to point at it.No
gitinstalled? Click the green Code button on the GitHub page, choose Download ZIP, then unzip it somewhere you'll remember. -
Open
chrome://extensions/in Chrome (paste that into the address bar). -
Toggle Developer mode on (top-right corner of the page).
-
Click Load unpacked and select the folder from step 1 (the one containing
manifest.json).
The extension is now installed. Next time Claude Code opens an OAuth tab, it'll authorize automatically.