Tom S
Tom S12mo ago

Authentication for all queries

New to convex, Hey I've just started using convex and im loving it so far, One question i have about auth, whats the best way to make sure all of my queries requrie authentication? I could put a check at the start of each query but i was wondering if there is a way to use middleware for example
2 Replies
lee
lee12mo ago
here's an example of adding middleware and enforcing it is used with a linter https://stack.convex.dev/eslint-setup#enforcing-imports-with-eslint
Set up ESLint for best practices
ESLint is a powerful tool that goes beyond simply type checking. We go over how to set it up and implement some basic workflows with the
Tom S
Tom SOP12mo ago
Amazing thanks!

Did you find this page helpful?