{"library":"passji","title":"passji","description":"Passji is an OIDC-based authentication service that uses emoji identities and WebAuthn passkeys instead of passwords. Version 0.0.2 is currently available. It provides SDKs for React, Next.js (Auth.js), Better Auth, Express, Hono, and Passport.js. Key differentiators: pseudonymous by default (no email required), AI-native API keys for agents, and emoji-based user identity. It ships TypeScript types and is designed for modern web and AI agent authentication flows.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install passji"],"cli":null},"imports":["import { createClient } from 'passji/client'","import { createServer } from 'passji/server'","import { PassjiProvider, usePassji } from 'passji/react'","import Passji from 'passji/nextauth'","import { passji } from 'passji/better-auth'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { createClient } from 'passji/client';\nimport { createServer } from 'passji/server';\nimport { PassjiProvider, usePassji } from 'passji/react';\n\n// Client-side: generate authorization URL with PKCE\nconst client = createClient({\n  clientId: process.env.PASSJI_CLIENT_ID ?? '',\n  redirectUri: 'http://localhost:3000/callback'\n});\nconst { url, codeVerifier } = await client.createAuthorizationURL();\n\n// Server-side: exchange code for tokens\nconst server = createServer({\n  clientId: process.env.PASSJI_CLIENT_ID ?? '',\n  clientSecret: process.env.PASSJI_CLIENT_SECRET ?? '',\n  redirectUri: 'http://localhost:3000/callback'\n});\nconst tokens = await server.exchangeCode('code', codeVerifier);\nconst user = await server.verifyIdToken(tokens.idToken);\nconsole.log(user.emojiId);\n\n// React: use PassjiProvider and usePassji\nfunction App() {\n  return (\n    <PassjiProvider clientId={process.env.PASSJI_CLIENT_ID ?? ''} onToken={(token) => fetch('/api/auth', { method: 'POST', body: JSON.stringify({ token }) })}>\n      <LoginButton />\n    </PassjiProvider>\n  );\n}\nfunction LoginButton() {\n  const { signIn, user } = usePassji();\n  if (user) return <span>{user.emojiId}</span>;\n  return <button onClick={signIn}>Sign in</button>;\n}","lang":"typescript","description":"Demonstrates client-side authorization URL generation with PKCE, server-side code exchange and ID token verification, and React hooks integration.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}