npm.io
0.9.14 • Published 10h ago

@nexusts/auth

Licence
MIT
Version
0.9.14
Deps
1
Size
70 kB
Vulns
0
Weekly
4.1K
Stars
1

Experimental / 실험 중 — This package is actively developed. The API may change without notice until v1.0.

@nexusts/auth

NexusTS — Bun-native fullstack framework

Description

Authentication via better-auth integration.

Provides authentication via better-auth. Brings the standard adapter so better-auth's API stays consistent with the rest of NexusTS (DI / decorator model). Type-safe users via @CurrentUser, sessions integrated with the framework's session module.

Install

This module is part of the NexusTS monorepo. Each module is published as its own npm package under the @nexusts/ scope.

Most apps start with just the core:

bun add @nexusts/core

Then add this module only if you need it:

bun add @nexusts/auth

Peer dependencies

bun add better-auth
  • better-auth ^1.6.0 — Authentication provider required by this module.

Without them the module loads but its public methods throw a clear error pointing to this install command on first call.

Usage

import { /* public API */ } from "@nexusts/auth";

See the user guide and the example app for a working demo.

License

MIT — see the root LICENSE.

Keywords