Fastify has its own package to handle strategies, which is fastify-auth
. Among its strategies include fastify-basic-auth
and fastify-jwt
.
NestJS has a wrapper for passport strategies; @nestjs/passport
, along with its documentation. I don't think they have a wrapper for Fastify strategies. I'm not sure how I would go about implementing the strategies into the project.
In the end, I would like to do the following:
@UseGuards(AuthGuard('FastifyBasicAuth'))
@Post('login')
async login() {
/* Logic... */
}