import { PassportSerializer } from '@nestjs/passport' ; import { Injectable } from '@nestjs/common' ; @ Injectable ( ) export class SessionSerializer extends PassportSerializer { serializeUser ( user , done ) { done ( null , user ) ; } deserializeUser ( payload , done ) { done ( null , payload ) ; } }