Closed numnes closed 3 years ago
@matheusnunesismael I am guessing this has something to do with passport and the way it works when the strategy is Request scoped. Have you checked this error in context of the passport module? You may find similar issues in stack overflow when using request scoped calls. Here is one from the nest issue logs https://github.com/nestjs/nest/issues/4646
Closing this because of inactivity or followup.
@matheusnunesismael did you ever get to the bottom of this? I am currently facing the same issue.
Hi I’m having an issue implementing a module responsible for the basic auth.
In my project I have the
tenant DB
with the users collection, in the core module I have a endpoint,/login
, that receives the basic login information and returns a JWT.At first I designed the project storage system keeping the users’ information in a shared database among the tenants, called
public database
, but eventually I had to change this approach and store the users’ information in his tenant database, but when I changed the mongoose instance fromto
While it was in the mongoose instance it showed no problem, but as soon as I simply change that very line mentioned above I get this error:
The login route and the basic auth middleware are implemented as follows: