How do I read context in middleware?
Hi all,
I have a middleware function in which I want to read the contents of 'context' to determine if I need to do something or not. Like the screenshot shows, context is of type 'never' but when I console.log the context out, I do see some values.
How should I do this?

3 Replies
generous-apricot•6mo ago
Have you already tried typing the {next, contex} object pair instead of leaving it untyped?
like-gold•6mo ago
you need to add
middleware([authMiddlware]) to sidMiddlwareambitious-aquaOP•5mo ago
ah nice, thanks