1.0.7 โข Published 5 months ago
@advancetec/auth-backend v1.0.7
@advancetec/auth-backend
Centralized authentication tools for AdvanceTEC Node apps using Auth0
This package provides backend authentication utilities designed for internal applications. It includes a backend Express middleware for verifying requests.
๐ฆ Installation
npm install @advancetec/auth-backend
๐ง Features
- ๐ authentication: Express middleware to validate JWTs in protected routes
๐ Usage
Express Auth Middleware
Use the authentication middleware to protect your API routes:
import express from 'express'
import { authentication } from '@advancetec/auth-backend'
const app = express()
app.use(authentication)
app.use('/private', routes)
๐ Environment Variables
The following variables are expected to be available in the consuming app:
AUTH0_AUDIENCE=your-api-audience
AUTH0_ISSUER_BASE_URL=https://your-tenant.auth0.com/
๐ค Exports
Name | Type | Description |
---|---|---|
authentication | Middleware | Express middleware for backend route protection |
๐๏ธ File Structure (Simplified)
src/
โโโ backend/
โ โโโ middleware.ts
๐ ๏ธ Roadmap
Add test suite + CI integration
๐งพ License
Internal use only. Not licensed for external distribution.