Skip to content
Advertisement

Guard not returning authenticated user

I have created a guard

JavaScript

And i am using it on of my endpoints

JavaScript

The point is it is faling because getRequest is not returning the authenticated user it is returning undefined

JavaScript

How can i return the authenticated user from the response ?

Advertisement

Answer

You should use your JwtAuthGuard at your controller level since nest doesn’t have an order to run the decorators.

JavaScript
Advertisement