open-index/open-npm huggingface dataset:
npm package: @kairosauth/react
Description: React Provider, hooks, and components for KairosAuth — useKairosAuth, LoginButton, OTPInput, PasskeyManager
Latest version: 0.2.0

# @kairosauth/react

React Provider, hooks, and components for KairosAuth authentication.

## Install

```bash
npm install @kairosauth/react @kairosauth/sdk
```

## Quick Start

```tsx
import { KairosAuthProvider, useKairosAuth, LoginButton } from "@kairosauth/react";

function App() {
  return (
    <KairosAuthProvider projectId="ka_proj_xxx" apiKey="ka_test_xxx">
      <LoginPage />
    </KairosAuthProvider>
  );
}

function LoginPage() {
  const { user, isAuthenticated, logout } = useKairosAuth();

  if (isAuthenticated) {
    return (
      <div>
        <p>Welcome, {user.email}</p>
        <button onClick={logout}>Logout</button>
      </div>
    );
  }

  return <LoginButton />;
}
```

## Hooks

| Hook | Description |
|------|-------------|
| `useKairosAuth()` | Full auth state + actions (register, login, logout) |
| `useAuthPhase()` | Current auth phase (idle, otp, webauthn, done) |
| `useSession()` | Session info (token, expiry, refresh) |
| `useOTP()` | OTP-specific actions (submit, resend, countdown) |
| `usePasskeys()` | Passkey management (create, list, delete) |

## Components

| Component | Description |
|-----------|-------------|
| `LoginButton` | Pre-styled login trigger |
| `OTPInput` | 8-box OTP verification input |
| `AuthStatus` | Current auth state indicator |
| `AuthGuard` | Render children only if authenticated |
| `PasskeyManager` | List and manage registered passkeys |

## Hosted Auth (OAuth-style)

```ts
import { loginWithRedirect, parseRedirectResult } from "@kairosauth/react";

// Redirect to KairosAuth hosted login
loginWithRedirect({ clientId: "ka_xxx", redirectUri: "https://myapp.com/callback" });

// Handle callback
const result = parseRedirectResult(window.location);
```

## Requirements

- React >= 18.0.0
- @kairosauth/sdk >= 0.1.0

## License

MIT
npm package: @kairosauth/sdk
Description: Device-first, blockchain-anchored authentication SDK — P-256 keys, WebAuthn PRF, on-chain Merkle proofs
Latest version: 0.2.0

# @kairosauth/sdk

Device-first, blockchain-anchored authentication SDK. Zero runtime dependencies.

## Features

- P-256 (secp256r1) key generation via SubtleCrypto
- WebAuthn PRF for hardware-backed key wrapping (Secure Enclave)
- HKDF / Argon2id key derivation
- IndexedDB encrypted key storage
- On-chain Merkle proof verification
- ERC-4337 smart wallet integration
- Offline-first with network failover

## Install

```bash
npm install @kairosauth/sdk
```

## Quick Start

```ts
import { KairosAuthClient } from "@kairosauth/sdk";

const client = new KairosAuthClient({
  projectId: "ka_proj_abc123",
  apiKey: "ka_test_xxx",
});

// Register / Login
const flow = await client.register("alice@example.com");
const result = await flow.submitOTP("ABC12345");
console.log("Identity:", result.identityId);
```

## Security Tiers

| Tier | Storage | Key Protection |
|------|---------|----------------|
| 1 | Secure Enclave | WebAuthn PRF + HKDF (non-extractable) |
| 2 | IndexedDB | Argon2id password wrapping |

## API

### Client
- `KairosAuthClient` - Main orchestrator (register, login, wallet)

### Crypto
- `generateKeyPair()` - P-256 ECDSA key generation
- `wrapKey()` / `unwrapKey()` - AES-GCM key wrapping
- `signChallenge()` - ECDSA signature
- `deriveWrappingKey()` - HKDF from device secret

### WebAuthn
- `createCredential()` - Register a passkey with PRF
- `getAssertion()` - Authenticate with passkey
- `detectTier()` - Check device capabilities

### Storage
- `storeWrappedKey()` / `getWrappedKey()` - IndexedDB operations
- `hasStoredIdentity()` - Check for existing credentials

## License

MIT
npm package: @kairosds/generator-polymer-init-firebase-auth-roles
Description: Polymer Gerator with Firebase auth roles
Author: Kairos DS Team
Latest version: 0.1.1

# generator-polymer-init-firebase-auth-roles [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> 

## Installation

First, install [Yeoman](http://yeoman.io) and generator-polymer-init-firebase-auth-roles using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g generator-polymer-init-firebase-auth-roles
```

Then generate your new project:

```bash
yo polymer-init-firebase-auth-roles
```

## Getting To Know Yeoman

 * Yeoman has a heart of gold.
 * Yeoman is a person with feelings and opinions, but is very easy to work with.
 * Yeoman can be too opinionated at times but is easily convinced not to be.
 * Feel free to [learn more about Yeoman](http://yeoman.io/).

## License

MIT © [Kairos DS Team]()


[npm-image]: https://badge.fury.io/js/%40kairosds%2Fgenerator-polymer-init-firebase-auth-roles.svg
[npm-url]: https://npmjs.org/package/@kairosds/generator-polymer-init-firebase-auth-roles
[travis-image]: https://travis-ci.org/KairosDS/generator-polymer-init-firebase-auth-roles.svg?branch=master
[travis-url]: https://travis-ci.org/KairosDS/generator-polymer-init-firebase-auth-roles
[daviddm-image]: https://david-dm.org/KairosDS/generator-polymer-init-firebase-auth-roles.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/KairosDS/generator-polymer-init-firebase-auth-roles
[coveralls-image]: https://coveralls.io/repos/github/KairosDS/generator-polymer-init-firebase-auth-roles/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/KairosDS/generator-polymer-init-firebase-auth-roles?branch=master