Skip to content

workos/authkit-chrome-extension-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AuthKit Chrome Extension Example

A Chrome extension that integrates with WorkOS AuthKit for authentication management.

authkit-chrome-extension.mp4

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:

    pnpm install
  3. Create a configuration file:

    • Copy config.example.json to config.json
    • Fill in your WorkOS credentials:
      {
        "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 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

About

An example of using AuthKit in a Chrome example, sharing the session with the app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published