ephemeral-auth-react
v1.0.1
Published
Ephemeral authentication for React - No tokens, just proofs that vanish!
Downloads
10
Maintainers
Readme
Ephemeral Auth React 🔐
Ephemeral authentication for React - No tokens, just proofs that vanish! 💨
Installation
```bash npm install poof-auth-react ```
Quick Start
```jsx import { PoofClient } from 'poof-auth-react';
const client = new PoofClient();
// Example usage async function loginUser(username: string) { // 1. Request ephemeral challenge const challengeResp = await client.requestLogin(username); console.log('Ephemeral Challenge:', challengeResp.challenge);
// 2. Solve challenge and get ephemeral session const solution = 'calculated_solution_here'; const authResp = await client.solveChallenge(username, solution);
if (authResp.status === 'authenticated') { console.log('Ephemeral Session:', authResp.session);
// 3. Use session (vanishes after use!)
const useResp = await client.useSession(authResp.session);
console.log('Access:', useResp);} } ```
Features
- ✅ No tokens to steal
- ✅ Ephemeral sessions that vanish after use
- ✅ Quantum-resistant cryptography
- ✅ Simple API
- ✅ TypeScript support
How It Works
- Request Ephemeral Challenge - Get a one-time mathematical problem
- Solve Challenge - Create an ephemeral proof without tokens
- Get Ephemeral Session - Receive a session that self-destructs
- Use Session - Access granted! Then it goes POOF! 💨
Why Ephemeral Authentication?
Traditional auth uses long-lived tokens that can be stolen and reused.
Ephemeral Auth uses one-time proofs that vanish after each use.
🔓 Traditional: Token theft = Hours of access
✅ Ephemeral: Session theft = One action only
