open-index/open-npm huggingface dataset:
npm package: @quantumauth/node
Description: QuantumAuth backend/middleware SDK
Latest version: 0.4.0

![Powered by QuantumAuth](https://img.shields.io/badge/Powered%20By-QuantumAuth-1a1a1a?style=for-the-badge&logo=dependabot)
[![npm version](https://img.shields.io/npm/v/@quantumauth/node.svg)](https://www.npmjs.com/package/@quantumauth/node)
![npm downloads](https://img.shields.io/npm/dm/@quantumauth/node.svg)
[![License](https://img.shields.io/npm/l/@quantumauth/node.svg)](https://github.com/quantumauth-io/quantum-auth-sdk/blob/main/LICENSE)
# @quantumauth/node

QuantumAuth Node SDK — server-side authentication middleware.

## 🚀 Install

```sh
pnpm add @quantumauth/node
```

## Development

is QA_ENV is not set in your environment it will default to prod.

options are:

```ts
QA_ENV=local   // for local development
QA_ENV=develop // for develop environment (Official QA develop)
```


## 🧩 Usage (Express)

imports

```ts
import {
    createExpressQuantumAuthMiddleware,
    QUANTUMAUTH_ALLOWED_HEADERS,
    QuantumAuthRequest
} from "@quantumauth/node";
```
Use middleware

```ts
app.post("/qa/demo", qaMiddleware, (req: QuantumAuthRequest, res : Response) => {

    res.json({
        userId: req.userId,  // middleware inject the authenticated user id in the request
        body: req.body,
    });
});

```

## 🔐 CORS Allowed Headers

The headers required to authenticate user with QA proof (TPM signatures)

```ts
app.use(cors({
    origin: ["http://localhost:3000"], // address of the front end
    methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
    allowedHeaders: [
        ...QUANTUMAUTH_ALLOWED_HEADERS
    ],
    credentials: true,
}));
```

## 📘 Docs

[Read the documentation](https://docs.quantumauth.io) 

## 📝 License

Apache 2.0.
npm package: @quantumauth/web
Description: QuantumAuth browser SDK
Latest version: 0.4.1

![Powered by QuantumAuth](https://img.shields.io/badge/Powered%20By-QuantumAuth-1a1a1a?style=for-the-badge&logo=dependabot)
[![npm version](https://img.shields.io/npm/v/@quantumauth/web.svg)](https://www.npmjs.com/package/@quantumauth/web)
![npm downloads](https://img.shields.io/npm/dm/@quantumauth/web.svg)
[![License](https://img.shields.io/npm/l/@quantumauth/web.svg)](https://github.com/quantumauth-io/quantum-auth-sdk/blob/main/LICENSE)
![bundle size](https://img.shields.io/bundlephobia/minzip/@quantumauth/web)
![TypeScript](https://img.shields.io/badge/TypeScript-5+-blue?logo=typescript)


# @quantumauth/web

QuantumAuth Web SDK — client-side encrypted request generator.

## 🚀 Install

```sh
pnpm add @quantumauth/web
```

## 🧩 Usage

```ts
import { createQuantumAuthClient } from "@quantumauth/web";
```

## 💻 Develop

⚠️ Important:

```QA_ENV=local``` → local development

```QA_ENV=dev``` → development environment

```(unset)``` → production

📚 Docs: https://docs.quantumauth.io/

## 📝 License

Apache 2.0.