New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nl-framework/auth

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nl-framework/auth

Better Auth integration for NL Framework with DI-friendly configuration and HTTP middleware.

latest
npmnpm
Version
0.3.5
Version published
Maintainers
1
Created
Source

@nl-framework/auth

Authentication toolkit built around Better Auth with first-class HTTP routes, guards, middleware, and GraphQL helpers for session-aware Nael applications.

Installation

bun add @nl-framework/auth better-auth

Highlights

  • HTTP routes – register opinionated Better Auth endpoints (sign up, session management, passwordless) in one call.
  • GraphQL integration – secure fields with directives or the provided SessionGuard so resolvers stay declarative.
  • Extensible strategies – plug in custom adapters or extend providers through dependency injection without rewriting scaffolding.

Quick start

import { Module } from '@nl-framework/core';
import { registerBetterAuthHttpRoutes, SessionGuard, AuthModule } from '@nl-framework/auth';
import { Controller, Get, UseGuards } from '@nl-framework/http';

@Controller('/profile')
@UseGuards(SessionGuard)
class ProfileController {
  @Get('/')
  me() {
    return { message: 'Secure profile payload' };
  }
}

@Module({
  imports: [
    AuthModule.forRoot({
      providers: ['email'],
    }),
  ],
  controllers: [ProfileController],
})
export class AppModule {
  constructor() {
    registerBetterAuthHttpRoutes();
  }
}

License

Apache-2.0

Keywords

auth

FAQs

Package last updated on 06 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts