AgentStack
SKILL verified Apache-2.0 Self-run

Integrate Browser

skill-thunder-id-skills-integrate-browser · by thunder-id

Add ThunderID authentication to a vanilla browser app using the official @thunderid/browser SDK. Use when asked to "add ThunderID to my vanilla JS app", "integrate ThunderID without a framework", or when there is no frontend framework but the app runs in the browser. For Node.js environments, use /integrate-javascript instead.

No reviews yet
0 installs
6 views
0.0% view→install

Install

$ agentstack add skill-thunder-id-skills-integrate-browser

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Integrate Browser? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

ThunderID — Browser SDK Integration

Assumes ThunderID is running at https://localhost:8090. If not, run /setup-thunderid first.

@thunderid/browser is the browser-specific ThunderID SDK. It builds on @thunderid/javascript and adds DOM/window integrations — use it for apps running directly in the browser without a framework.

Step 1 — Register an Application

Ask the developer to create an application in ThunderID and share the Client ID before continuing.

Guide them through these steps:

  1. Open https://localhost:8090/console and sign in (default: admin / secret)
  2. Navigate to Applications → New Application
  3. Fill in:
  • Name: their app name (e.g. my-browser-app)
  • Type: Single Page Application
  • Authorized Redirect URL: http://localhost:5173
  1. Click Create and copy the Client ID shown on the next screen

Once they paste the Client ID, use it in all subsequent steps. Do not use a placeholder — wait for the real value.

Step 2 — Install

Detect the package manager from lockfiles: pnpm-lock.yamlpnpm add, yarn.lockyarn add, bun.lockbbun add, else npm install.

npm install @thunderid/browser

Step 3 — Initialize the SDK

Create src/auth.js:

import { ThunderIDBrowserClient } from '@thunderid/browser'

const auth = new ThunderIDBrowserClient()

await auth.initialize({
  clientId: '',
  baseUrl: 'https://localhost:8090',
  afterSignInUrl: window.location.origin,
  afterSignOutUrl: window.location.origin,
})

export default auth

Step 4 — Add Sign-In, Sign-Out, and User Display

Replace src/main.js:

import './style.css'
import auth from './auth.js'

async function renderApp() {
  const isSignedIn = await auth.isSignedIn()

  if (isSignedIn) {
    const user = await auth.getUser()

    document.querySelector('#app').innerHTML = `
      
        Welcome, ${user.displayName || user.username}!
        Email: ${user.email || 'N/A'}
        Sign Out
      
    `
    document.querySelector('#sign-out-btn')
      .addEventListener('click', () => auth.signOut())
  } else {
    document.querySelector('#app').innerHTML = `
      
        You are not signed in.
        Sign In
      
    `
    document.querySelector('#sign-in-btn')
      .addEventListener('click', () => auth.signIn())
  }
}

renderApp()

Step 5 — Run and Verify

npm run dev

Click Sign In — you should be redirected to https://localhost:8090 and returned after login.

Troubleshooting

Certificate error — Visit https://localhost:8090 in your browser and accept the warning once.

Not signed in after redirect — Ensure auth.initialize() is awaited on every page load; it detects the code query parameter automatically and completes the callback exchange.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.