Can I create a global InjectionToken for authentication check? #1859
Unanswered
ahmadalibaloch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have created an AuthModule which verifies a JWT token and provides AuthenicatedUser InjectionToken like below
and this is how I created the
authenticated
middleware.Now I want to use this middleware in all modules e.g. in UserModule case I get the error
No provider for InjectionToken authenticated-user! - in Module \"UserModule\" (Operation Scope)
here is the UserModule:
How can I create a middleware (for authentication) which intercepts all requests to read authorization header in all modules.
Beta Was this translation helpful? Give feedback.
All reactions