Tony133/nestjs-api-boilerplate-jwt

jwt stragety question

huantaoliu opened this issue · 2 comments

Hi Tony,

Sorry if I abused your issues. I wanted to ask you a question or send you a message regarding this repo (I guess it will be greate if Github allows user send message to each other)

in the validate function of jwt.strategy.ts
why do you need this.loginService.validateUserByJwt() since the validation is done by jwt, and if it pass, you will receive
the user playload in the validation function, otherwise the framework will throw unauthorized exception directly?

I am in the process of learn it, so maybe I am missing something.
Thanks

@huantaoliu let's say that it is an "alternative" method to the validate method but I think that sooner or later I will remove it at least that I have not added the refresh token then I can reuse it.

however don't worry if you open problems, for me there is no problem

cool thanks, your repo is great by the way. very well organized.