Run Resolver after guards #664
Unanswered
RubenFricke
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 a guard on my routes which handle auth. Besides that, this auth add a user object to the request model:
I want to use this user data in my custom resolver so I know which user is logged in. This is the start of my custom resolver:
However, when adding
console.log
statements, I notice that the resolver runs after the guard, resulting in user being undefined. How can I change this so the resolver runs after the guard on my route.Important to note, I've tried
disableMiddleware:
to be true and false. When I set it to true, the user object has been set (so it runs correctly, but whenever it should generate an error response it crashses:Beta Was this translation helpful? Give feedback.
All reactions