Thought the article was great! When I first attempted at setting up Auth0 with NestJS I couldn’t find anything, so I ended up having to work it out myself (also at the time the pull request to integrate jwks-rsa
with passport-jwt
was still in the works), and an article like this would have been really helpful. I had a couple of questions:
Questions
- Would it be possible to check the roles/permissions against the
@Permissions
metadata within thevalidate
method of the firstJwtStrategy
AuthGuard
? - Why use
dotenv
instead of@nestjs/config
(NestJS’s configuration package which utilisesdotenv
under the hood).
Anyway, thanks for the great tutorial. I’m currently using some ideas from it to add to my nestjs-auth0 example/starter repo.