Skip to content

NestJS Login 관련 npm pack.

DevGun edited this page Feb 13, 2021 · 2 revisions

Use Passport with NestJS

$ npm i passport @nestjs/passport passport-jwt jwks-rsa
  • passport: Express-compatible authentication middleware for Node.js.
  • @nestjs/passport: The Passport utility module for Nest.
  • passport-jwt: Passport Strategy for authenticating with a JSON Web Token (JWT).
  • jwks-rsa: A library to retrieve RSA signing keys from a JWKS (JSON Web Key Set) endpoint.

Login with Google in NestJS

$ npm install --save @nestjs/passport passport passport-google-oauth20 dotenv
$ npm install -D @types/passport-google-oauth20

  • Query — for querying data (SELECT operations)
  • Mutation — for creating new and updating/deleting existing data (INSERT, UPDATE, DELETE)

Clone this wiki locally