# authey-test

> Expose [Auth.js](https://authjs.dev/) [REST APIs](https://authjs.dev/reference/rest-api) to your express/[connect](https://www.npmjs.com/package/connect) apps.

Latest version **0.0.1** (published 2022-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install authey-test
pnpm add authey-test
yarn add authey-test
bun add authey-test
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-12-16 |
| First published | 2022-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 23.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Author | Robert Soriano |
| Maintainers | wobsoriano |

## Links

- npm: https://www.npmjs.com/package/authey-test
- Repository: https://github.com/wobsoriano/authey
- Homepage: https://github.com/wobsoriano/authey#readme
- Issues: https://github.com/wobsoriano/authey/issues
- npm.io page: https://npm.io/package/authey-test

## Dependencies (4)

- [requrl](https://npm.io/package/requrl.md) ^3.0.2
- [@web-std/file](https://npm.io/package/@web-std/file.md) ^3.0.2
- [@web-std/fetch](https://npm.io/package/@web-std/fetch.md) ^4.1.0
- [@web-std/stream](https://npm.io/package/@web-std/stream.md) ^1.0.1

## Recent versions

- 0.0.1 (latest) — 2022-12-16

## README

# Authey

Expose [Auth.js](https://authjs.dev/) [REST APIs](https://authjs.dev/reference/rest-api) to your express/[connect](https://www.npmjs.com/package/connect) apps.

## Install

```bash
pnpm add @auth/core authey
```

## Usage

Express

```ts
import express from 'express'

import { createAuthMiddleware } from 'authey'
import type { AuthOptions } from '@auth/core'
import GithubProvider from '@auth/core/providers/github'

const app = express()

const authOptions: AuthOptions = {}
app.use(createAuthMiddleware(authOptions))
```

Nuxt

```ts
// server/middleware/auth.ts
import { createAuthMiddleware } from 'authey'

export default fromNodeMiddleware(createAuthMiddleware({}))
```

Fastify

```ts
import Fastify from 'fastify'
import Middie from '@fastify/middie'
import { createAuthMiddleware } from 'authey'

async function build() {
  const fastify = Fastify()
  await fastify.register(Middie)
  fastify.use(createAuthMiddleware({}))
  return fastify
}
```

## License

[MIT](./LICENSE) License © 2022 [Robert Soriano](https://github.com/wobsoriano)

---
_Source: https://npm.io/package/authey-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
