
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
@koakh/nestjs-package-jwt-authentication
Advanced tools
Koakh NestJS Jwt Authentication Starter Package
README in GitHub: NestJsPackageJwtAuthentication
# bootstrap a new nest test app
$ nest new test
$ cd test
# install deps
$ npm i @koakh/nestjs-package-jwt-authentication @nestjs/config
# edit AppModule
$ code src/app.module.ts
add AuthModule
and ConfigModule
from @koakh/nestjs-package-jwt-authentication
and @nestjs/config
src/app.module.ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AuthModule } from '@koakh/nestjs-package-jwt-authentication';
import { ConfigModule } from '@nestjs/config';
@Module({
imports: [
ConfigModule.forRoot({ isGlobal: true, }),
AuthModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule { }
add a test/.env
file
ACCESS_TOKEN_JWT_SECRET=secretKeyAccessToken
ACCESS_TOKEN_EXPIRES_IN=15m
REFRESH_TOKEN_JWT_SECRET=secretKeyRefreshToken
REFRESH_TOKEN_EXPIRES_IN=7d
REFRESH_TOKEN_SKIP_INCREMENT_VERSION=false
# clone client.http
wget https://raw.githubusercontent.com/koakh/NestJsPackageJwtAuthentication/main/client.http
Note: required the awesome REST Client
now test all requests
or test with a simple curl
$ curl --request POST \
--url http://localhost:3000/auth/login \
--header 'content-type: application/json' \
--header 'user-agent: vscode-restclient' \
--data '{"username": "admin","password": "12345678"}' \
| jq
{
"user": {
"id": "efeed3eb-c0a2-4b3e-816f-2a42ca8451b3",
"username": "admin",
"firstName": "Pietra",
"lastName": "Heine",
"email": "pheine0@illinois.edu",
"roles": [
"USER",
"ADMIN"
],
"createdDate": 1597444307,
"metaData": {
"key": "value"
}
},
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiZWZlZWQzZWItYzBhMi00YjNlLTgxNmYtMmE0MmNhODQ1MWIzIiwicm9sZXMiOlsiVVNFUiIsIkFETUlOIl0sImlhdCI6MTYwMjI2MDk3NywiZXhwIjoxNjAyMjYxODc3fQ.-n6-xmrKIObquE10bKHnKRgzDvIFClkOQiVJMy8w0ew"
}
we are done
FAQs
Koakh NestJS Jwt Authentication Starter Package
The npm package @koakh/nestjs-package-jwt-authentication receives a total of 4 weekly downloads. As such, @koakh/nestjs-package-jwt-authentication popularity was classified as not popular.
We found that @koakh/nestjs-package-jwt-authentication demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.