Skip to main content
Glama

MCP Server NestJS

by Cstannahill
local.stategy.ts718 B
import { Strategy } from 'passport-local'; import { PassportStrategy } from '@nestjs/passport'; import { Injectable, UnauthorizedException } from '@nestjs/common'; import { AuthService } from '../auth.service'; import { User } from '../../users/entities/user.entity'; @Injectable() export class LocalStrategy extends PassportStrategy(Strategy) { constructor(private authService: AuthService) { super({ usernameField: 'email' }); // Use email as username field } async validate(email: string, password: string): Promise<User> { const user = await this.authService.validateUser(email, password); if (!user) { throw new UnauthorizedException('Invalid credentials'); } return user; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cstannahill/mcp-server-nestjs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server