How to write global authentication middleware #24469
Answered
by
martinskou
Jengro777
asked this question in
Questions and Answers
-
Write it this way, authentication returns false. But the program will still return an "index success" message instead of an authentication error message |
Beta Was this translation helpful? Give feedback.
Answered by
martinskou
May 13, 2025
Replies: 1 comment 2 replies
-
|
You need to hook up the middleware using: |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Jengro777
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to hook up the middleware using:
app.use()
or
app.route_use()