-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Hi, Is it possible to integrate the passport-cognito into Nest.js by using PassportStrategy and AuthGuard? I found the JwtStrategy worked only for Auth0 and would like to customize a CognitoStrategy extends PassportStrategy(Strategy), something like following in TypeScript:
import { Strategy } from 'passport-cognito';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable, Logger } from '@nestjs/common';
@Injectable()
export class CognitoStrategy extends PassportStrategy(Strategy) {
private readonly logger = new Logger(CognitoStrategy.name);
constructor() {
super( // please help here...);
}
async validate(payload: any) {
this.logger.log('payload: ', payload);
return payload;
}
}
Thanks a lot
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels