Observed since 21 Oct, 09:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Modal SDK for partner user login/authentication.
@0xobelisk/controller)Modal SDK that projects can embed for user login/auth. Published as @0xobelisk/controller, with ESM/CJS/UMD outputs and adapters for React, Vue, Svelte, Solid, Preact, Angular, and Cocos Creator.
Platform-specific guides available for:
src/) that creates/destroys the modal with a simple API.src/styles.css) with gradients, blur, and responsive layout.examples/basic) showing how to open the modal, plus a full-flow mock page (examples/full-flow) with CTA -> modal -> mock auth -> close,支持深色金色卡片风格。tsc (no runtime deps).npm install @0xobelisk/controller
import { createAuthModal } from '@0xobelisk/controller';
import '@0xobelisk/controller/styles.css';
const modal = createAuthModal({
onSelect: (providerId) => {
console.log('Selected:', providerId);
if (providerId === 'create-session') {
// Handle session creation
handleCreateSession();
} else if (providerId === 'quit') {
modal.close();
}
},
onClose: () => {
console.log('Modal closed');
}
});
modal.open();
import { useAuthModal } from '@0xobelisk/controller/react';
import '@0xobelisk/controller/styles.css';
export default function LoginPage() {
const modal = useAuthModal({
onSelect: (providerId) => {
console.log('Selected:', providerId);
if (providerId === 'create-session') {
handleCreateSession();
}
}
});
return <button onClick={modal.open}>Login</button>;
}
See complete integration guides for all platforms →
Session management with blockchain authentication:
import { runSessionFlow } from '@0xobelisk/controller';
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
const userKeypair = Ed25519Keypair.generate();
try {
const session = await runSessionFlow({
keypair: userKeypair,
endpoints: {
start: 'https://api.example.com/session/start',
create: 'https://api.example.com/session/create'
}
});
console.log('Session created:', session.sessionKey);
} catch (error) {
console.error('Session creation failed:', error);
}
See complete session management guide →
Run examples locally:
npm install
npm run build
npm run serve # http://localhost:4173
Examples available at:
http://localhost:4173/examples/basic/http://localhost:4173/examples/full-flow/const modal = createAuthModal({
variant: 'card',
accentColor: '#7a63ff',
backgroundImage: 'https://unpkg.com/@0xobelisk/controller/dist/dubhe.jpeg',
onSelect: (providerId) => {
console.log('Selected:', providerId);
}
});
const modal = createAuthModal({
accentColor: '#6366f1', // Indigo
onSelect: handleAuth
});
Adapters available for all major platforms:
@0xobelisk/controller/react@0xobelisk/controller/vue@0xobelisk/controller/svelte@0xobelisk/controller/solid@0xobelisk/controller/preact@0xobelisk/controller/angular@0xobelisk/controller/cocos@0xobelisk/controllerView platform-specific integration guides →
Returns an AuthModalController instance.
Options:
onSelect: (providerId: string) => void - Required callback when button clickedonClose?: () => void - Optional callback when modal closestitle?: string - Modal title (default: "Authenticate to continue")subtitle?: string - Modal subtitlevariant?: 'card' | 'split' - Layout variant (default: "split")accentColor?: string - Primary color (default: "#7a63ff")backgroundImage?: string - Background image URLbuttons?: AuthButton[] - Custom buttonscontainer?: HTMLElement - Mount container (default: document.body)Returns:
open() - Show the modalclose() - Hide the modaldestroy() - Remove and cleanupisOpen() - Check if modal is openContributions are welcome! Please feel free to submit a Pull Request.
MIT © Obelisk Labs
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.10Registry latest | 26 Nov 2025 | 42 | |
| 0.2.9 | 24 Nov 2025 | 42 | |
| 0.2.8 | 24 Nov 2025 | 42 | |
| 0.2.6 | 24 Nov 2025 | 42 | |
| 0.2.5 | 24 Nov 2025 | 42 | |
| 0.2.4 | 24 Nov 2025 | 36 | |
| 0.2.3 | 24 Nov 2025 | 36 | |
| 0.2.1 | 23 Nov 2025 | 36 | |
| 0.2.0 | 23 Nov 2025 | 36 | |
| 0.1.0 | 23 Nov 2025 | 36 | |
| 0.0.9 | 23 Nov 2025 | 36 | |
| 0.0.8 | 23 Nov 2025 | 36 | |
| 0.0.7 | 20 Nov 2025 | 12 | |
| 0.0.6 | 20 Nov 2025 | 12 | |
| 0.0.5 | 20 Nov 2025 | 12 | |
| 0.0.4 | 20 Nov 2025 | 12 | |
| 0.0.3 | 20 Nov 2025 | 12 | |
| 0.0.2 | 20 Nov 2025 | 12 | |
| 0.0.1 | 20 Nov 2025 | 12 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 09:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e876aa7c736b262481d28e128c5d3547cd9ca7e5f9a65b104f2da1d0ac661935