nestjs-google-auth-guard
Version:
Google Auth Guard for NestJS
12 lines (11 loc) • 489 B
TypeScript
import { OptPromise } from './types';
import { ExecutionContext } from '@nestjs/common';
import { LoginTicket } from 'google-auth-library';
export interface GoogleAuthGuardOptions {
clientID: string;
globalGuards?: boolean;
contextFilter?(context: ExecutionContext): boolean;
validate?(ticket: LoginTicket): OptPromise<boolean | undefined>;
extractToken?(context: ExecutionContext): string | undefined;
canIgnoreMissingToken?(context: ExecutionContext): boolean;
}