-
Book Overview & Buying
-
Table Of Contents
Nest.js: A Progressive Node.js Framework
By :
In this section, we will implement the authentication manually using passport without using the Nest.js package.
In order to configure passport, three things need to be configured:
Passport uses the strategy to authenticate a request, and the verification of the credential is delegated to the strategies in some of the requests.
Before using passport, you must configure the strategy, and in this case we will use the passport-jwt strategy.
Before anything else, you must install the appropriate packages:
npm i passport-jwt @types/passport-jwtnpm i jsonwebtoken @types/jsonwebtoken In order to have a working example, you must implement some modules, and we will start with AuthenticationModule. The AuthenticationModule will configure the strategy using the jwt strategy. To configure the strategy we will extend the Strategy class provided...
Change the font size
Change margin width
Change background colour