You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My NestJS server logs an ERROR [AuthGuard] undefined in production, but everything works fine and the API key is checked correctly. I don't see the error locally.
Version : 1.2.2
My middleware :
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import Strategy from 'passport-headerapikey';
@Injectable()
export class HeaderApiKeyStrategy extends PassportStrategy(
Strategy,
'api-key',
) {
constructor() {
super({ header: 'X-API-KEY', prefix: '' }, true, async (apiKey, done) => {
return this.validate(apiKey, done);
});
}
public validate = (apiKey: string, done: (error: Error, data) => {}) => {
// my API key validation
};
}
Is there something serious I should check ?
The text was updated successfully, but these errors were encountered:
I have the same error. For me it is nest js + FacebookStrategy. It appears after the callback is called, and before I am back in the controller. I can't find what causes is either. Tried to debug it with stepping over.. still nothing. But the feature works 🤷🏼
My NestJS server logs an
ERROR [AuthGuard] undefined
in production, but everything works fine and the API key is checked correctly. I don't see the error locally.Version : 1.2.2
My middleware :
Is there something serious I should check ?
The text was updated successfully, but these errors were encountered: