venego
Explore posts from serversCan I respond to client from a middleware?
I have this authentication middleware that needs to refresh the access token of a JWT session, and I don't want to duplicate the logic in all procedures.
How can I send a response from the middleware itself?
When I do a simple return, TS gives me some errors, it seems that it expects
next()
as an output.2 replies
Context is not fully globally accessed? [ probably newbie question ]
I create a context in the based procedure, but It's undefined in the procedure based on it.
Also the NVM I should've defined it upon server creation.
Context defined by a procedure cannot be seen by another procedure?? how do I get around that?
opts.ctx
doesn't exist before I create it, although I've used .context()
upon initializing trpc
, but that's no big deal.7 replies