You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
479 B

2 years ago
import { Injectable } from '@nestjs/common'
import { PassportSerializer } from '@nestjs/passport'
import { type Profile } from 'passport-42'
@Injectable()
export class SessionSerializer extends PassportSerializer {
2 years ago
serializeUser (
user: Profile,
done: (err: Error | null, user: Profile) => void
): any {
2 years ago
done(null, user)
}
2 years ago
deserializeUser (
payload: Profile,
done: (err: Error | null, user: Profile) => void
): any {
2 years ago
done(null, payload)
}
}