Is it possible to have a service only used by an AuthGuard in the same module be a singleton?
Brian H
Posted on May 1, 2024
I haven't been able to get it to work. It seems like the constructor of the auth guard is only called once, but I get a different instance of the service when canActivate is called in the guard.
Is there a way to confirm this? Is there a thing I can log to get the instanceId of the service or something?
💖 💪 🙅 🚩
Brian H
Posted on May 1, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
javascript Exploring NestJS: A Powerful Node.js Framework for Modern Web Development
November 7, 2023