You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, I apologize if I am not posting in the correct place as it might be an error in the Adonis plugin for Japa.
I am migrating my project from V5 to V6 and encountered the following difficulty.
My application uses CSRF, auth, and method spoofing.
In all non-GET routes within the tests, an Invalid or expired CSRF token error was reported.
I tried to isolate the error and created a repository replicating the issue. When I disable CSRF protection, it works. I'm not sure if it's a misconfiguration or a real problem.
I found several small issues in this part of the Adonis documentation, such as missing imports in the examples or conflicting explanations.
I discovered the problem after a long time. I use zshrc with the dotenv plugin. In v5, Adonis would overwrite the environment variables that the plugin had loaded into memory. In v6, the priority was given to those that were in the terminal, and this would change the SESSION_DRIVER.
Package version
@japa/plugin-adonisjs ^3.0.1
Describe the bug
Firstly, I apologize if I am not posting in the correct place as it might be an error in the Adonis plugin for Japa.
I am migrating my project from V5 to V6 and encountered the following difficulty.
My application uses CSRF, auth, and method spoofing.
In all non-GET routes within the tests, an
Invalid or expired CSRF token
error was reported.I tried to isolate the error and created a repository replicating the issue. When I disable CSRF protection, it works. I'm not sure if it's a misconfiguration or a real problem.
I found several small issues in this part of the Adonis documentation, such as missing imports in the examples or conflicting explanations.
Reproduction repo
https://github.com/filipebraida/adonis-csrf-test-problem
The text was updated successfully, but these errors were encountered: