I used them while testing out deploying Adonis v5 apps with Cleaver and they were extremely helpful.
The project was running fine on my local; but then I kept getting the following error after deploying.
Unexpected exception raised from HTTP ExceptionHandler "handle" method
Stack:
Exception: Invalid guard "/login". Make sure the guard is defined inside the config/auth file
at AuthManager.makeMapping
Basically, the experience was users weren't being redirect to /loginpage.
I ended up updating the dependencies to more current and was able to repro on my local and then saw IntelliJ was giving me the hint to update redirectTo route in Auth.ts for AuthenticationException to a guard. Swapped '/login' with 'web' and, voila! All good on local and prod.
Thanks for these examples!
I used them while testing out deploying Adonis v5 apps with Cleaver and they were extremely helpful.
The project was running fine on my local; but then I kept getting the following error after deploying.
Basically, the experience was users weren't being redirect to
/login
page.I ended up updating the dependencies to more current and was able to repro on my local and then saw IntelliJ was giving me the hint to update
redirectTo
route in Auth.ts forAuthenticationException
to a guard. Swapped '/login' with 'web' and, voila! All good on local and prod.Thanks again for all of your helpful resources!