https://github.com/workos/authkit-chrome-extension-example
An example of using AuthKit in a Chrome example, sharing the session with the app.
https://github.com/workos/authkit-chrome-extension-example
Last synced: 12 months ago
JSON representation
An example of using AuthKit in a Chrome example, sharing the session with the app.
- Host: GitHub
- URL: https://github.com/workos/authkit-chrome-extension-example
- Owner: workos
- License: mit
- Created: 2025-04-25T16:06:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-12T14:47:35.000Z (about 1 year ago)
- Last Synced: 2025-06-28T07:46:41.352Z (12 months ago)
- Language: TypeScript
- Size: 290 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AuthKit Chrome Extension Example
A Chrome extension that integrates with WorkOS AuthKit for authentication management.
https://github.com/user-attachments/assets/e7b90729-a200-4743-9a9f-1294ebb2e698
## Features
- Manage AuthKit sessions within Chrome browser
- Monitor and automatically refresh authentication tokens
- View current session status in popup interface
- Log out from the extension popup
## Setup Instructions
1. Clone this repository
2. Install dependencies:
```bash
pnpm install
```
3. Create a configuration file:
- Copy `config.example.json` to `config.json`
- Fill in your WorkOS credentials:
```json
{
"apiKey": "your_workos_api_key",
"clientId": "your_workos_client_id",
"cookiePassword": "must be at least 32 characters long",
"cookieDomain": "http://localhost:3000",
"redirectUri": "http://localhost:3000/callback"
}
```
4. Build the extension:
```
pnpm build
```
## Loading the Extension in Chrome
1. Open Chrome and go to `chrome://extensions`
2. Enable "Developer mode" (toggle in top-right corner)
3. Click "Load unpacked" button
4. Select the `dist_chrome` folder from this project
## Usage with AuthKit Example App
This extension is designed to work with the [next-authkit-example](https://github.com/workos/next-authkit-example) application as an example AuthKit app. You'll need to run both this extension and the next-authkit-example app together for full functionality. The extension will manage the AuthKit sessions created by the example app.
## Development
For development with hot reloading:
```
pnpm dev
```