Hi, I had some trouble with this example once I added the '.global' suffix to the file (the whole application requires credentials) where I was (I assume at least) getting an infinite redirection recursion to the /login route. Since this is a fairly common use for auth middlewares, I think making it more clear (either through code, a comment or a markdown tip) that applying it to '/login' causes that would avoid others falling into this little pitfall.
Hi, I had some trouble with this example once I added the '.global' suffix to the file (the whole application requires credentials) where I was (I assume at least) getting an infinite redirection recursion to the /login route. Since this is a fairly common use for auth middlewares, I think making it more clear (either through code, a comment or a markdown tip) that applying it to '/login' causes that would avoid others falling into this little pitfall.