async authenticated(@Req() request: Request) {
const user = request.user
return user
}
It is important for the 'user' variable to have the correct type globally.
While working with express passport, I came across the following:
declare global {
namespace Express {
// tslint:disable-next-line:no-empty-interface
interface AuthInfo {}
// tslint:disable-next-line:no-empty-interface
interface User {}
}
}
How can I ensure that this interface in nestjs has the proper assigned type?